HOME


sh-3ll 1.0
DIR:/opt/cloudlinux/venv/lib64/python3.11/site-packages/pandas/core/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/pandas/core/__pycache__/nanops.cpython-311.pyc
�

���h(�����ddlmZddlZddlZddlmZmZmZddlZddl	Z
ddlmZddl
mZmZmZmZddlmZmZmZmZmZmZmZmZmZddlmZddlmZdd	l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(dd
l)m*Z*m+Z+m,Z,edd�
��Z-e-duZ.da/d�d�d�Z0e0ed����Gd�d��Z1Gd�d��Z2d�d�Z3d�d�Z4	d�d�d"�Z5d�d(�Z6			d�d�d-�Z7d�d/�Z8d�d0�Z9d�d�d1�Z:d�d4�Z;d�d8�Z<d�d9�Z=dddd:�d�d;�Z>dddd:�d�d<�Z?e1d=��e;e=ddddd>�d�dB�������Z@d�dH�ZAe2��e;dddd:�d�dI�����ZBe2��dddd:�d�dJ���ZCd�dN�ZDe
jEe
jF��fd�dR�ZGe2dS�T��dddSddU�d�dV���ZHe1d=dW��e2dS�T��dddSddU�d�dX�����ZIe1d=dW��dddSddU�d�dY���ZJdZ�ZKeKd[d\�]��ZLeKd^d_�]��ZMdddd:�d�da�ZNdddd:�d�db�ZOe1d=dW��e=dddd:�d�dc�����ZPe1d=dW��e=dddd:�d�dd�����ZQe1d=dW��e=ddddd>�d�de�����ZRd�dg�ZSe
jEe
jF��fd�dj�ZT	d�d�dm�ZUd�dn�ZVdo�ZWe1d=dW��dpddq�d�dx���ZXd�dz�ZYe1d=dW��ddSd{�d�d|���ZZd}�Z[d�d�Z\dS)��)�annotationsN)�Any�Callable�cast)�
get_option)�NaT�NaTType�iNaT�lib)	�	ArrayLike�AxisInt�CorrelationMethod�Dtype�DtypeObj�F�Scalar�Shape�npt)�import_optional_dependency)�find_stack_level)�
is_complex�is_float�is_float_dtype�
is_integer�is_numeric_dtype�is_object_dtype�needs_i8_conversion�pandas_dtype)�isna�na_value_for_dtype�notna�
bottleneck�warn)�errorsFT�v�bool�return�Nonec��tr|adSdS�N)�_BOTTLENECK_INSTALLED�_USE_BOTTLENECK)r%s �I/opt/cloudlinux/venv/lib64/python3.11/site-packages/pandas/core/nanops.py�set_use_bottleneckr.9s����������zcompute.use_bottleneckc�0��eZdZd�fd�Zdd�Zd
d
�Z�xZS)�disallow�dtypesrr'r(c���t�����td�|D����|_dS)Nc3�>K�|]}t|��jV��dSr*)r�type)�.0�dtypes  r-�	<genexpr>z$disallow.__init__.<locals>.<genexpr>Fs-����I�I��L��/�/�4�I�I�I�I�I�Ir/)�super�__init__�tupler2)�selfr2�	__class__s  �r-r:zdisallow.__init__Ds;���
���������I�I�&�I�I�I�I�I����r/r&c�`�t|d��ot|jj|j��S)Nr7)�hasattr�
issubclassr7r5r2)r<�objs  r-�checkzdisallow.checkHs'���s�G�$�$�P��C�I�N�D�K�)P�)P�Pr/�frc�p���tj�����fd���}tt|��S)Nc�f��tj||�����}t�fd�|D����r.�j�dd��}t
d|�d����	�|i|��S#t$r+}t|d��rt
|��|��d}~wwxYw)Nc3�B�K�|]}��|��V��dSr*)rB)r6rAr<s  �r-r8z0disallow.__call__.<locals>._f.<locals>.<genexpr>Os-�����7�7�s�4�:�:�c�?�?�7�7�7�7�7�7r/�nan�zreduction operation 'z' not allowed for this dtyper)	�	itertools�chain�values�any�__name__�replace�	TypeError�
ValueErrorr)�args�kwargs�obj_iter�f_name�erCr<s     ��r-�_fzdisallow.__call__.<locals>._fLs���� ��t�V�]�]�_�_�=�=�H��7�7�7�7�h�7�7�7�7�7�
���+�+�E�2�6�6���P�F�P�P�P����	
��q�$�)�&�)�)�)���
�
�
�
#�4��7�+�+�.�#�A�,�,�A�-������
���s�3A;�;
B0�&B+�+B0��	functools�wrapsrr)r<rCrVs`` r-�__call__zdisallow.__call__KsG����	���	�	�	�	�	�	�	�
�	�	�$�A�r�{�{�r/)r2rr'r(�r'r&)rCrr'r)rM�
__module__�__qualname__r:rBrZ�
__classcell__)r=s@r-r1r1Cso�������J�J�J�J�J�J�Q�Q�Q�Q��������r/r1c� �eZdZdd	d�Zd
d�ZdS)�bottleneck_switchNr'r(c�"�||_||_dSr*)�namerR)r<rbrRs   r-r:zbottleneck_switch.__init__cs����	�����r/�altrc�������jp�j�	tt����n#tt
f$rd�YnwxYwt
j���ddd�d
����fd	���}tt|��S)NT��axis�skipnarK�
np.ndarrayrf�AxisInt | Nonergr&c���t�
j��dkr(�
j���D]\}}||vr|||<�|jdkr%|�d���t||��Strw|rut|j�	��r`|�dd���=|�	dd���|fd|i|��}t|��r�|f||d�|��}n�|f||d�|��}n�|f||d�|��}|S)Nr�	min_count�maskrfre)�lenrR�items�size�get�_na_for_min_countr,�_bn_ok_dtyper7�pop�	_has_infs)rKrfrg�kwds�kr%�resultrc�bn_func�bn_namer<s       ����r-rCz%bottleneck_switch.__call__.<locals>.fos^����4�;���!�#�#� �K�-�-�/�/�$�$�D�A�q���}�}�"#��Q����{�a���D�H�H�[�$9�$9�$A�)���6�6�6��
G�6�
G�l�6�<��.Q�.Q�
G��8�8�F�D�)�)�1��H�H�V�T�*�*�*�$�W�V�?�?�$�?�$�?�?�F�!��(�(�O�!$��V�!N�$�v�!N�!N��!N�!N��� �S��J�d�6�J�J�T�J�J�F�F���V�F�$�v�F�F��F�F���Mr/)rKrhrfrirgr&)
rbrM�getattr�bn�AttributeError�	NameErrorrXrYrr)r<rcrCrxrys`` @@r-rZzbottleneck_switch.__call__gs��������)�+�s�|��	��b�'�*�*�G�G���	�*�	�	�	��G�G�G�	����
���	�	�$(��	%	�%	�%	�%	�%	�%	�%	�%	�%	�%	�
�	�%	�N�A�q�z�z�s�*�A�Ar*)r'r()rcrr'r)rMr\r]r:rZ�r/r-r`r`bsA�����������0�0�0�0�0�0r/r`r7rrb�strc�B�|tkrt|��s|dvSdS)N)�nansum�nanprod�nanmeanF)�objectr)r7rbs  r-rrrr�s+������2�5�9�9���;�;�;��5r/c��t|tj��r0|jdvr't	j|�d����S	tj|�����S#ttf$rYdSwxYw)N)�f8�f4�KF)�
isinstance�np�ndarrayr7r�has_infs�ravel�isinfrLrO�NotImplementedError)rws r-rtrt�s����&�"�*�%�%�3��<�<�'�'��<����S� 1� 1�2�2�2���x����#�#�%�%�%���*�+�����u�u����s�%A2�2B�B�
fill_value�
Scalar | Nonec��|�|St|��r-|�tjS|dkrtjStjS|dkrtjStS)z9return the correct fill value for the dtype of the valuesN�+inf)�_na_ok_dtyper�rG�infr�i8maxr
)r7r��fill_value_typs   r-�_get_fill_valuer��s`�������E���
��!��6�M���'�'��v�
���w���V�#�#��9���Kr/rKrhrgrl�npt.NDArray[np.bool_] | Nonec�h�|�/|jjdvrdS|s|jjdvrt|��}|S)a�
    Compute a mask if and only if necessary.

    This function will compute a mask iff it is necessary. Otherwise,
    return the provided mask (potentially None) when a mask does not need to be
    computed.

    A mask is never necessary if the values array is of boolean or integer
    dtypes, as these are incapable of storing NaNs. If passing a NaN-capable
    dtype that is interpretable as either boolean or integer data (eg,
    timedelta64), a mask must be provided.

    If the skipna parameter is False, a new mask will not be computed.

    The mask is computed using isna() by default. Setting invert=True selects
    notna() as the masking function.

    Parameters
    ----------
    values : ndarray
        input array to potentially compute mask for
    skipna : bool
        boolean for whether NaNs should be skipped
    mask : Optional[ndarray]
        nan-mask if known

    Returns
    -------
    Optional[np.ndarray[bool]]
    N�biu�mM)r7�kindr)rKrgrls   r-�_maybe_get_maskr��sF��B�|��<���%�%��4��	 �V�\�&�$�.�.���<�<�D��Kr/rr��
str | None�/tuple[np.ndarray, npt.NDArray[np.bool_] | None]c��t|||��}|j}d}|jjdvr)tj|�d����}d}|r}|�{t
|||���}|�g|���rS|st|��r+|�	��}tj
|||��ntj|||��}||fS)a�
    Utility to get the values view, mask, dtype, dtype_max, and fill_value.

    If both mask and fill_value/fill_value_typ are not None and skipna is True,
    the values array will be copied.

    For input arrays of boolean or integer dtypes, copies will only occur if a
    precomputed mask, a fill_value/fill_value_typ, and skipna=True are
    provided.

    Parameters
    ----------
    values : ndarray
        input array to potentially compute mask for
    skipna : bool
        boolean for whether NaNs should be skipped
    fill_value : Any
        value to fill NaNs with
    fill_value_typ : str
        Set to '+inf' or '-inf' to handle dtype-specific infinities
    mask : Optional[np.ndarray[bool]]
        nan-mask if known

    Returns
    -------
    values : ndarray
        Potential copy of input value array
    mask : Optional[ndarray[bool]]
        Mask for values, if deemed necessary to compute
    Fr��i8TN)r�r�)r�r7r�r��asarray�viewr�rLr��copy�putmask�where)rKrgr�r�rlr7�datetimelikes       r-�_get_valuesr��s���R�6�6�4�0�0�D��L�E��L�
�|��D� � ���F�K�K��-�-�.�.����
�A�4�#�%��j��
�
�
�
��!��x�x�z�z�
A��A�<��#6�#6�A�#�[�[�]�]�F��J�v�t�Z�8�8�8�8� �X�t�e�V�Z�@�@�F��4�<�r/�np.dtypec��|}|jdvrtjtj��}nS|jdkrtjtj��}n)|jdkrtjtj��}|S)N�bi�urC)r�r�r7�int64�uint64�float64)r7�	dtype_maxs  r-�_get_dtype_maxr�Dsk���I��z�T����H�R�X�&�&�	�	�	��s�	�	��H�R�Y�'�'�	�	�	��s�	�	��H�R�Z�(�(�	��r/c�d�t|��rdSt|jtj��S)NF)rr@r5r��integer�r7s r-r�r�Ps.���5�!�!���u��%�*�b�j�1�1�1�1r/c��|tur�n�|jdkr�|�t}t|tj��s�t
|��r
Jd���||krtj}t
|��r)t	jdd���	|��}n't	j
|���|��}|�	|d���}�n|�	|��}n�|jdkr�t|tj��s�||kst	j|��r(t	j
d���	|��}n�t	j|��tjkrt#d	���t	j
|���	|d���}n(|�	d
���|��}|S)zwrap our results if needed�MNzExpected non-null fill_valuer�nsF�r��mzoverflow in timedelta operation�m8[ns])rr�r
r�r�r�rrG�
datetime64�astyper�r��isnan�timedelta64�fabsrr�rP)rwr7r�s   r-�
_wrap_resultsr�Vs���
��}�}��	��s�	�	����J��&�"�*�-�-�
	*��J�'�'�G�G�)G�G�G�'���#�#�����F�|�|�
6���u�d�3�3�:�:�5�A�A�����&�)�)�.�.�u�5�5���]�]�5�u�]�5�5�F�F��]�]�5�)�)�F�F�	��s�	�	��&�"�*�-�-�	9���#�#�r�x��'7�'7�#����.�.�5�5�e�<�<��������3�9�,�,� �!B�C�C�C���&�)�)�0�0��U�0�C�C����]�]�8�,�,�1�1�%�8�8�F��Mr/�funcrc�x��tj���dddd�d
�fd���}tt|��S)z�
    If we have datetime64 or timedelta64 values, ensure we have a correct
    mask before calling the wrapped function, then cast back afterwards.
    NT�rfrgrlrKrhrfrirgr&rlr�c����|}|jjdv}|r|�t|��}�|f|||d�|��}|r4t||jt���}|s|�J�t||||��}|S)Nr�r�)r�)r7r�rr�r
�_mask_datetimelike_result)	rKrfrgrlrR�orig_valuesr�rwr�s	        �r-�new_funcz&_datetimelike_compat.<locals>.new_func�s�������|�(�D�0���	 �D�L���<�<�D���f�L�4��T�L�L�V�L�L���	T�"�6�;�+<��N�N�N�F��
T��'�'�'�2�6�4��{�S�S���
r/�rKrhrfrirgr&rlr�rW)r�r�s` r-�_datetimelike_compatr�s_����_�T��� $��-1�����������0��8���r/rfri�Scalar | np.ndarrayc��|jjdvr|�d��}t|j��}|jdkr|S|�|S|jd|�|j|dzd�z}t
j|||j���S)a�
    Return the missing value for `values`.

    Parameters
    ----------
    values : ndarray
    axis : int or None
        axis for the reduction, required if values.ndim > 1.

    Returns
    -------
    result : scalar or ndarray
        For 1-D values, returns a scalar of the correct missing type.
        For 2-D values, returns a 1-D array where each element is missing.
    �iufcbr��Nr�)r7r�r�r �ndim�shaper��full)rKrfr��result_shapes    r-rqrq�s���"�|��G�#�#����y�)�)��#�F�L�1�1�J�
�{�a�����	
�����|�E�T�E�*�V�\�$��(�*�*�-E�E���w�|�Z�v�|�D�D�D�Dr/c�t��tj���dd�d�fd���}tt|��S)	z�
    NumPy operations on C-contiguous ndarrays with axis=1 can be
    very slow if axis 1 >> axis 0.
    Operate row-by-row and concatenate the results.
    N�rfrKrhrfric�������|dkr�|jdkr�|jdr�|jddz|jdkr�|jtkr�|jt
kr�t
|�����d���A��d�������fd�tt�����D��}n��fd��D��}tj|��S�|fd	|i���S)
Nr���C_CONTIGUOUSi�rrlc�>��g|]}��|fd�|i�����S�rlr~)r6�i�arrsr�rRrls  ����r-�
<listcomp>z:maybe_operate_rowwise.<locals>.newfunc.<locals>.<listcomp>�sE������>?�D�D��a��9�9�t�A�w�9�&�9�9���r/c�"��g|]}�|fi�����Sr~r~)r6�xr�rRs  ��r-r�z:maybe_operate_rowwise.<locals>.newfunc.<locals>.<listcomp>�s+���;�;�;��4�4��,�,�V�,�,�;�;�;r/rf)
r��flagsr�r7r�r&�listrprs�rangermr��array)rKrfrR�resultsr�rlr�s  ` @@�r-�newfuncz&maybe_operate_rowwise.<locals>.newfunc�s%������
�A�I�I���q� � ���^�,�!���a��4�'�6�<��?�:�:����&�&����$�$���<�<�D��z�z�&�!�!�-��z�z�&�)�)���������CH��T���CS�CS������<�;�;�;�;�d�;�;�;���8�G�$�$�$��t�F�0�0��0��0�0�0r/)rKrhrfrirW)r�r�s` r-�maybe_operate_rowwiser��sW����_�T���>B�1�1�1�1�1�1�1���1�.��7���r/r�c�f�|jjdvr|�|�|��S|jjdkr(tjdt
t
�����t||d|���\}}|jtkr|�	t��}|�|��S)a
    Check if any elements along an axis evaluate to True.

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : bool

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, 2])
    >>> nanops.nanany(s.values)
    True

    >>> from pandas.core import nanops
    >>> s = pd.Series([np.nan])
    >>> nanops.nanany(s.values)
    False
    �iubNr�zz'any' with datetime64 dtypes is deprecated and will raise in a future version. Use (obj != pd.Timestamp(0)).any() instead.��
stacklevelF�r�rl)r7r�rL�warningsr#�
FutureWarningrr�r�r�r&�rKrfrgrl�_s     r-�nananyr��s���D�|��E�!�!�d�l��z�z�$����
�|��C����
�
J��'�)�)�		
�	
�	
�	
��F�F�u�4�H�H�H�I�F�A��|�v������t�$�$���:�:�d���r/c�f�|jjdvr|�|�|��S|jjdkr(tjdt
t
�����t||d|���\}}|jtkr|�	t��}|�|��S)a
    Check if all elements along an axis evaluate to True.

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : bool

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, 2, np.nan])
    >>> nanops.nanall(s.values)
    True

    >>> from pandas.core import nanops
    >>> s = pd.Series([1, 0])
    >>> nanops.nanall(s.values)
    False
    r�Nr�zz'all' with datetime64 dtypes is deprecated and will raise in a future version. Use (obj != pd.Timestamp(0)).all() instead.r�Tr�)r7r��allr�r#r�rr�r�r�r&r�s     r-�nanallr�s���D�|��E�!�!�d�l��z�z�$����
�|��C����
�
J��'�)�)�		
�	
�	
�	
��F�F�t�$�G�G�G�I�F�A��|�v������t�$�$���:�:�d���r/�M8)rfrgrkrlrk�int�floatc�,�|j}t||d|���\}}t|��}|jdkr|}n)|jdkrt	jtj��}|�||���}t||||j|���}|S)a�
    Sum the elements along an axis ignoring NaNs

    Parameters
    ----------
    values : ndarray[dtype]
    axis : int, optional
    skipna : bool, default True
    min_count: int, default 0
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : dtype

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, 2, np.nan])
    >>> nanops.nansum(s.values)
    3.0
    rr�rCr�r��rk)	r7r�r�r�r�r��sum�_maybe_null_outr�)rKrfrgrkrlr7�	dtype_sum�the_sums        r-r�r�\s���D
�L�E��v�v�!�$�G�G�G�L�F�D��u�%�%�I��z�S����	�	�	��s�	�	��H�R�Z�(�(�	��j�j��Y�j�/�/�G��g�t�T�6�<�9�U�U�U�G��Nr/rw�+np.ndarray | np.datetime64 | np.timedelta64�npt.NDArray[np.bool_]r��5np.ndarray | np.datetime64 | np.timedelta64 | NaTTypec�`�t|tj��rN|�d���|j��}|�|���}t||<nE|���r1tjt���|j��S|S)Nr�r�)	r�r�r�r�r�r7rLr
r�)rwrfrlr��	axis_masks     r-r�r��s����&�"�*�%�%�	:����t�$�$�)�)�+�*;�<�<���H�H�$�H�'�'�	�!��y����8�8�:�:�	:��8�D�>�>�&�&�{�'8�9�9�9��Mr/c��|j}t||d|���\}}t|��}tjtj��}|jdvrtjtj��}n7|jdvrtjtj��}n|jdkr|}|}t
|j|||���}|�||���}t|��}|��t|dd	��rvttj|��}tj
d
���5||z}	ddd��n#1swxYwY|dk}
|
���rtj|	|
<n|dkr||zntj}	|	S)a
    Compute the mean of the element along an axis ignoring NaNs

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    float
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, 2, np.nan])
    >>> nanops.nanmean(s.values)
    1.5
    rr�r��iurCr�Nr�F�ignore)r�)r7r�r�r�r�r��_get_countsr�r��_ensure_numericrzrr��errstaterLrG)rKrfrgrlr7r��dtype_count�countr��the_mean�ct_masks           r-r�r��s���B
�L�E��v�v�!�$�G�G�G�L�F�D��u�%�%�I��(�2�:�&�&�K�
�z�T����H�R�Z�(�(�	�	�	��t�	�	��H�R�Z�(�(�	�	�	��s�	�	��	������d�D��D�D�D�E��j�j��Y�j�/�/�G��g�&�&�G���G�G�V�U�;�;���R�Z��'�'��
�[�X�
&�
&�
&�	'�	'����H�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��1�*���;�;�=�=�	'� "��H�W���&+�a�i�i�7�U�?�?�R�V���Os�*D<�<E�Ec�@��|jjdko|du}d�fd�	}|j}t|�|d���\}}|jjdkr�|jtkr+t	j|��}|dvrt
d|�d����	|�d��}n/#t$r"}t
t|����|�d}~wwxYw|s1|�/|j
js|���}tj||<|j}	|jd	kr�|��|	r͉stj|||��}
n�t%j��5t%jd
dt*��|jd	d	kr|dks|jdd	kr/|d	kr)tjtj|��d
���}
ntj||���}
ddd��n#1swxYwYn0t3|j|��}
n|	r|||��ntj}
t5|
|��S)a�
    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : float
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, np.nan, 2, 2])
    >>> nanops.nanmedian(s.values)
    2.0
    rCNc�6��|�t|��}n|}�s |���stjSt	j��5t	jddt��tj||��}ddd��n#1swxYwY|S)Nr�All-NaN slice encountered)	r!r�r�rGr��catch_warnings�filterwarnings�RuntimeWarning�	nanmedian)r��_mask�resrgs   �r-�
get_medianznanmedian.<locals>.get_median�s�����=��!�H�H�E�E��F�E��	�e�i�i�k�k�	��6�M�
�
$�
&�
&�	)�	)��#��5�~�
�
�
��,�q��x�(�(�C�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)��
s�6B�B�B)rlr���string�mixedzCannot convert � to numericr�r�rr
rT)�keepdimsr�r*)r7r�r�r�r�infer_dtyperOr�rPrr��	writeabler�r�rGror��apply_along_axisr�rrrr�r�squeeze�_get_empty_reduction_resultr�)rKrfrgrl�using_nan_sentinelrr7�inferred�err�notemptyrs  `        r-rr�s����6 ��*�c�1�B�d�d�l��
�
�
�
�
�
�
�L�E��v�v�D�T�J�J�J�L�F�D�
�|��C����<�6�!�!���v�.�.�H��.�.�.�� E�&� E� E� E�F�F�F�	/��]�]�4�(�(�F�F���	/�	/�	/��C��H�H�%�%�3�.�����	/������$�"2��|�%�	#��[�[�]�]�F��v��t���{�H��{�Q���4�+��	B��
>��)�*�d�F�C�C����,�.�.�>�>��+� �"=�~������Q��1�,�,�������Q��1�,�,�����!�l�2�:�f�+=�+=��M�M�M��� �l�6��=�=�=��>�>�>�>�>�>�>�>�>�>�>����>�>�>�>��$.�f�l�D�A�A�C�C�+3�>�j�j���&�&�&������e�$�$�$s+�B�
C�%C�C�?B	G�G�Gr�rr
c��tj|��}tjt|����}tj|||ktj���}|�tj��|S)z�
    The result from a reduction on an empty ndarray.

    Parameters
    ----------
    shape : Tuple[int, ...]
    axis : int

    Returns
    -------
    np.ndarray
    r�)r�r��arangerm�emptyr��fillrG)r�rf�shp�dims�rets     r-rrCs^�� 
�(�5�/�/�C�
�9�S��Z�Z� � �D�
�(�3�t�t�|�$�B�J�
7�
7�
7�C��H�H�R�V�����Jr/�values_shape�ddof�-tuple[float | np.ndarray, float | np.ndarray]c��t||||���}||�|��z
}t|��r||krtj}tj}ntttj|��}||k}|���r@tj||tj��tj||tj��||fS)a:
    Get the count of non-null values along an axis, accounting
    for degrees of freedom.

    Parameters
    ----------
    values_shape : Tuple[int, ...]
        shape tuple from values ndarray, used if mask is None
    mask : Optional[ndarray[bool]]
        locations in values that should be considered missing
    axis : Optional[int]
        axis to count along
    ddof : int
        degrees of freedom
    dtype : type, optional
        type to use for count

    Returns
    -------
    count : int, np.nan or np.ndarray
    d : int, np.nan or np.ndarray
    r�)	rr5rr�rGrr�rLr�)r*rlrfr+r7r�ds       r-�_get_counts_nanvarr/Zs���:
��d�D��>�>�>�E�
��
�
�4� � � �A�����
,��D�=�=��F�E���A���R�Z��'�'����}���8�8�:�:�	,��J�q�$���'�'�'��J�u�d�B�F�+�+�+��!�8�Or/r��r+�rfrgr+rlc	���|jdkr|�d��}|j}t|||���\}}tjt|||||�����}t
||��S)a�
    Compute the standard deviation along given axis while ignoring NaNs

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    ddof : int, default 1
        Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
        where N represents the number of elements.
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : float
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, np.nan, 2, 3])
    >>> nanops.nanstd(s.values)
    1.0
    zM8[ns]r�r�r1)r7r�r�r��sqrt�nanvarr�)rKrfrgr+rl�
orig_dtyperws       r-�nanstdr6�st��H�|�x������X�&�&����J��v�v�D�9�9�9�L�F�D�
�W�V�F��f�4�d�S�S�S�
T�
T�F����,�,�,r/�m8c��|j}t|||��}|jdvr&|�d��}|�tj||<|jjdkr!t
|j||||j��\}}nt
|j|||��\}}|r,|�*|���}t	j	||d��t|�|tj�����|z}|�t	j
||��}t||z
dz��}	|�t	j	|	|d��|	�|tj���|z}
|jdkr|
�|d�	��}
|
S)
a�
    Compute the variance along given axis while ignoring NaNs

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    ddof : int, default 1
        Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
        where N represents the number of elements.
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : float
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, np.nan, 2, 3])
    >>> nanops.nanvar(s.values)
    1.0
    rr�NrCr)rfr7r�Fr�)r7r�r�r�r�rGr/r�r�r�rr�r��expand_dims)rKrfrgr+rlr7rr.�avg�sqrrws           r-r4r4�st��J
�L�E��6�6�4�0�0�D��z�T������t�$�$�����6�F�4�L�
�|��C���%�f�l�D�$��f�l�S�S���q�q�%�f�l�D�$��E�E���q�
�$�$�"�������
�
�6�4��#�#�#��&�*�*�$�b�j�*�A�A�
B�
B�U�
J�C����n�S�$�'�'��
�3��<�A�-�
.�
.�C���
�
�3��a� � � �
�W�W�$�b�j�W�
1�
1�A�
5�F�

�z�S������u�5��1�1���Mr/c��t|||||���t|||��}|jjdkr|�d��}|s"|� |���rtjSt|j	||||j��\}}t|||||���}t
j
|��t
j
|��zS)a�
    Compute the standard error in the mean along given axis while ignoring NaNs

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    ddof : int, default 1
        Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
        where N represents the number of elements.
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : float64
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, np.nan, 2, 3])
    >>> nanops.nansem(s.values)
     0.5773502691896258
    r1rCr�)r4r�r7r�r�rLr�rGr/r�r3)rKrfrgr+rlrr��vars        r-�nansemr>s���L�6��V�$�T�B�B�B�B��6�6�4�0�0�D�
�|��C������t�$�$����d�&�4�8�8�:�:�&��v�
�!�&�,��d�D�&�,�O�O�H�E�1�
��d�6��4�
H�
H�
H�C�
�7�3�<�<�"�'�%�.�.�(�(r/c�n���td������tdddd�d��fd
�����}|S)NrG)rbTr�rKrhrfrirgr&rlr�c����|jdkrt||��St||�|���\}}t|���|��}t	||||j��}|S)Nr�r�rl)rorqr�rzr�r�)rKrfrgrlrwr��meths     ��r-�	reductionz_nanminmax.<locals>.reduction;sx����;�!���$�V�T�2�2�2�"��F�>��
�
�
����'����&�&�t�,�,�� ���t�V�\�B�B���
r/r�)r`r�)rBr�rCs`` r-�
_nanminmaxrD:sk�����L�$�L�L�)�)�)�� $��-1�����������*�)��"�r/�minr�)r��max�-inf�int | np.ndarrayc��t|dd|���\}}|�|��}t||||��}|S)a�
    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : int or ndarray[int]
        The index/indices  of max value in specified axis or -1 in the NA case

    Examples
    --------
    >>> from pandas.core import nanops
    >>> arr = np.array([1, 2, 3, np.nan, 4])
    >>> nanops.nanargmax(arr)
    4

    >>> arr = np.array(range(12), dtype=np.float64).reshape(4, 3)
    >>> arr[2:, 2] = np.nan
    >>> arr
    array([[ 0.,  1.,  2.],
           [ 3.,  4.,  5.],
           [ 6.,  7., nan],
           [ 9., 10., nan]])
    >>> nanops.nanargmax(arr, axis=1)
    array([2, 2, 1, 1])
    TrGrA)r��argmax�_maybe_arg_null_out�rKrfrgrlrws     r-�	nanargmaxrMU�J��L�v�t�F��N�N�N�L�F�D�
�]�]�4�
 �
 �F�!���t�V�
<�
<�F��Mr/c��t|dd|���\}}|�|��}t||||��}|S)a�
    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : int or ndarray[int]
        The index/indices of min value in specified axis or -1 in the NA case

    Examples
    --------
    >>> from pandas.core import nanops
    >>> arr = np.array([1, 2, 3, np.nan, 4])
    >>> nanops.nanargmin(arr)
    0

    >>> arr = np.array(range(12), dtype=np.float64).reshape(4, 3)
    >>> arr[2:, 0] = np.nan
    >>> arr
    array([[ 0.,  1.,  2.],
           [ 3.,  4.,  5.],
           [nan,  7.,  8.],
           [nan, 10., 11.]])
    >>> nanops.nanargmin(arr, axis=1)
    array([0, 0, 1, 1])
    Tr�rA)r��argminrKrLs     r-�	nanargminrQ�rNr/c�4�t|||��}|jjdkr,|�d��}t	|j||��}nt	|j|||j���}|r-|�+|���}tj||d��n$|s"|� |�	��rtj
Stjdd���5|�|tj
���|z}ddd��n#1swxYwY|�tj||��}||z
}|r|�tj||d��|dz}||z}|�|tj
���}	|�|tj
���}
t|	��}	t|
��}
tjdd���5||d	z
d
zz|dz
z|
|	dzzz}ddd��n#1swxYwY|j}|jdkr|�|d�
��}t!|tj��r.tj|	dkd|��}tj
||dk<n/|	dkr|�d��n|}|dkrtj
S|S)a�
    Compute the sample skewness.

    The statistic computed here is the adjusted Fisher-Pearson standardized
    moment coefficient G1. The algorithm computes this coefficient directly
    from the second and third central moment.

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : float64
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, np.nan, 1, 2])
    >>> nanops.nanskew(s.values)
    1.7320508075688787
    rCr�r�Nrr��invalid�divider�r�g�?g�?Fr��)r�r7r�r�rr�r�r�r�rLrGrr�r�r9�_zero_out_fperrr�r�r�r5)
rKrfrgrlr�mean�adjusted�	adjusted2�	adjusted3�m2�m3rwr7s
             r-�nanskewr^�s��J�6�6�4�0�0�D�
�|��C������t�$�$���F�L�$��5�5����F�L�$��F�L�I�I�I��
��$�"�������
�
�6�4��#�#�#�#�
���(�T�X�X�Z�Z�(��v�
�	��X�h�	7�	7�	7�:�:��z�z�$�b�j�z�1�1�E�9��:�:�:�:�:�:�:�:�:�:�:����:�:�:�:����~�d�D�)�)����}�H�
�&�$�"�
�
�8�T�1�%�%�%��!��I��H�$�I�	���t�2�:��	.�	.�B�	���t�2�:��	.�	.�B�
��	�	�B�	��	�	�B�	��X�h�	7�	7�	7�M�M��5�1�9��,�,���	�:�r�B��G�|�L��M�M�M�M�M�M�M�M�M�M�M����M�M�M�M�
�L�E��z�S������u�5��1�1���&�"�*�%�%����"��'�1�f�-�-���F��u�q�y���"$��'�'����A����v���1�9�9��6�M��Ms$�%D�D	�D	�G-�-G1�4G1c��t|||��}|jjdkr,|�d��}t	|j||��}nt	|j|||j���}|r-|�+|���}tj||d��n$|s"|� |�	��rtj
Stjdd���5|�|tj
���|z}ddd��n#1swxYwY|�tj||��}||z
}|r|�tj||d��|dz}|dz}|�|tj
���}	|�|tj
���}
tjdd���5d	|d
z
dzz|dz
|d	z
zz}||d
zz|d
z
z|
z}|dz
|d	z
z|	dzz}
ddd��n#1swxYwYt|��}t|
��}
t!|
tj��s2|dkrtj
S|
dkr|j�d��Stjdd���5||
z|z
}ddd��n#1swxYwY|j}|jdkr|�|d�
��}t!|tj��r-tj|
dkd|��}tj
||dk<|S)a�
    Compute the sample excess kurtosis

    The statistic computed here is the adjusted Fisher-Pearson standardized
    moment coefficient G2, computed directly from the second and fourth
    central moment.

    Parameters
    ----------
    values : ndarray
    axis : int, optional
    skipna : bool, default True
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    result : float64
        Unless input is a float array, in which case use the same
        precision as the input array.

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, np.nan, 1, 3, 2])
    >>> nanops.nankurt(s.values)
    -1.2892561983471076
    rCr�r�NrrrSr�rVr��Fr�)r�r7r�r�rr�r�r�r�rLrGrr�r�r9rWr�r�r5r�)rKrfrgrlrrXrYrZ�	adjusted4r\�m4�adj�	numerator�denominatorrwr7s                r-�nankurtrf	s���J�6�6�4�0�0�D�
�|��C������t�$�$���F�L�$��5�5����F�L�$��F�L�I�I�I��
��$�"�������
�
�6�4��#�#�#�#�
���(�T�X�X�Z�Z�(��v�
�	��X�h�	7�	7�	7�:�:��z�z�$�b�j�z�1�1�E�9��:�:�:�:�:�:�:�:�:�:�:����:�:�:�:����~�d�D�)�)����}�H�
�&�$�"�
�
�8�T�1�%�%�%��!��I��1��I�	���t�2�:��	.�	.�B�	���t�2�:��	.�	.�B�	��X�h�	7�	7�	7�8�8��5�1�9��"�"�u�q�y�U�Q�Y�&?�@���U�Q�Y�'�5�1�9�5��:�	��q�y�U�Q�Y�/�"�a�%�7��8�8�8�8�8�8�8�8�8�8�8����8�8�8�8� �	�*�*�I�!�+�.�.�K��k�2�:�.�.�(��1�9�9��6�M��!����<�$�$�Q�'�'�'�	��X�h�	7�	7�	7�/�/��[�(�3�.��/�/�/�/�/�/�/�/�/�/�/����/�/�/�/�
�L�E��z�S������u�5��1�1���&�"�*�%�%�#���+��*�A�v�6�6���F��u�q�y���Ms6�%D�D	�D	�(:G.�.G2�5G2�9	J�J�Jc��t|||��}|r|�|���}d||<|�|��}t||||j|���S)a�
    Parameters
    ----------
    values : ndarray[dtype]
    axis : int, optional
    skipna : bool, default True
    min_count: int, default 0
    mask : ndarray[bool], optional
        nan-mask if known

    Returns
    -------
    Dtype
        The product of all elements on a given axis. ( NaNs are treated as 1)

    Examples
    --------
    >>> from pandas.core import nanops
    >>> s = pd.Series([1, 2, 3, np.nan])
    >>> nanops.nanprod(s.values)
    6.0
    Nr�r�)r�r��prodr�r�)rKrfrgrkrlrws      r-r�r�jsp��@�6�6�4�0�0�D�
��$�"���������t��
�[�[��
�
�F����d�F�L�I����r/�np.ndarray | intc� �|�|S|�t|dd��s0|r|���rdSn]|���rdSnF|r|�|��}n|�|��}|���rd||<|S)Nr�F���)rzr�rL)rwrfrlrg�na_masks     r-rKrK�s����|��
��|�7�6�6�5�9�9�|��	��x�x�z�z�
��r�
��x�x�z�z�
��r�
��	%��h�h�t�n�n�G�G��h�h�t�n�n�G��;�;�=�=�	!� �F�7�O��Mr/�np.dtype[np.floating]�&np.floating | npt.NDArray[np.floating]c�h�|�H|�|j|���z
}ntj|��}|�|��S|�$|j||�|��z
}n||}t
|��r|�|��S|�|d���S)a�
    Get the count of non-null values along an axis

    Parameters
    ----------
    values_shape : tuple of int
        shape tuple from values ndarray, used if mask is None
    mask : Optional[ndarray[bool]]
        locations in values that should be considered missing
    axis : Optional[int]
        axis to count along
    dtype : type, optional
        type to use for count

    Returns
    -------
    count : scalar or array
    NFr�)ror�r�rhr5r�rr�)r*rlrfr7�nrs      r-rr�s���0�|����	�D�H�H�J�J�&�A�A����%�%�A��z�z�!�}�}�����
�4� �4�8�8�D�>�>�1����T�"���%���!��z�z�%� � � ��<�<��E�<�*�*�*r/�np.ndarray | float | NaTType�tuple[int, ...]c���|�|dkr|S|��t|tj��r�|�+|j||�|��z
|z
dk}n<|||z
dk}|d|�||dzd�z}tj||��}tj|��rtt|��r`tj|��r|�	d��}n&t|��s|�	dd���}tj||<nbd||<n\|turSt|||��rBt|dd��}t|��r|�d	��}ntj}|S)
zu
    Returns
    -------
    Dtype
        The product of all elements on a given axis. ( NaNs are treated as 1)
    Nrr��c16r�Fr�r7rG)r�r�r�r�r��broadcast_torLr�iscomplexobjr�rrGr�check_below_min_countrzr5)	rwrfrlr�rk�	null_mask�below_count�	new_shape�result_dtypes	         r-r�r��s����|�	�Q����
���J�v�r�z�:�:������D�)�D�H�H�T�N�N�:�Y�F�!�K�I�I� ��+�	�1�A�5�K��e�t�e��u�T�A�X�Z�Z�'8�8�I����Y�?�?�I�
�6�)���		)���'�'�
)��?�6�*�*�=�#�]�]�5�1�1�F�F�'��/�/�=�#�]�]�4�e�]�<�<�F�$&�F��y�!�!�%)��y�!��	�s�	�	� ���i�8�8�	 �"�6�7�D�9�9�L��l�+�+�
 �%�*�*�5�1�1�������Mr/c��|dkr;|�tj|��}n|j|���z
}||krdSdS)a�
    Check for the `min_count` keyword. Returns True if below `min_count` (when
    missing value should be returned from the reduction).

    Parameters
    ----------
    shape : tuple
        The shape of the values (`values.shape`).
    mask : ndarray[bool] or None
        Boolean numpy array (typically of same shape as `shape`) or None.
    min_count : int
        Keyword passed through from sum/prod call.

    Returns
    -------
    bool
    rNTF)r�rhror�)r�rlrk�	non_nullss    r-rwrwsJ��(�1�}�}��<������I�I��	�D�H�H�J�J�.�I��y� � ��4��5r/c��t|tj��r,tjtj|��dkd|��Stj|��dkr|j�d��n|S)Ng�+����=r)r�r�r�r��absr7r5)�args r-rWrW*sc���#�r�z�"�"�A��x���s���e�+�Q��4�4�4�$&�F�3�K�K�%�$7�$7�s�y�~�~�a� � � �S�@r/�pearson)�method�min_periods�a�br�rr��
int | Nonec��t|��t|��krtd���|�d}t|��t|��z}|���s||}||}t|��|krtjSt
|��}t
|��}t|��}|||��S)z
    a, b: ndarrays
    z'Operands to nancorr must have same sizeNr�)rm�AssertionErrorr!r�r�rGr�
get_corr_func)r�r�r�r��validrCs      r-�nancorrr�2s����1�v�v��Q������F�G�G�G������!�H�H�u�Q�x�x��E��9�9�;�;��
�e�H��
�e�H��
�1�v�v�����v�
�����A�����A��f���A��1�Q��7�7�Nr/�)Callable[[np.ndarray, np.ndarray], float]c����|dkr
ddlm��fd�}|S|dkr
ddlm��fd�}|S|dkrd	�}|St|��r|St	d
|�d����)N�kendallr)�
kendalltauc�(���||��dS�Nrr~)r�r�r�s  �r-r�zget_corr_func.<locals>.funcXs����:�a��#�#�A�&�&r/�spearman)�	spearmanrc�(���||��dSr�r~)r�r�r�s  �r-r�zget_corr_func.<locals>.func_s����9�Q��?�?�1�%�%r/r�c�8�tj||��dS)N�rr�)r��corrcoef)r�r�s  r-r�zget_corr_func.<locals>.funces���;�q�!�$�$�T�*�*r/zUnknown method 'z@', expected one of 'kendall', 'spearman', 'pearson', or callable)�scipy.statsr�r��callablerP)r�r�r�r�s  @@r-r�r�Rs���������*�*�*�*�*�*�	'�	'�	'�	'�	'���	�:�	�	�)�)�)�)�)�)�	&�	&�	&�	&�	&���	�9�	�	�	+�	+�	+���	�&�	�	���
�
�	8�6�	8�	8�	8���r/)r�r+c��t|��t|��krtd���|�d}t|��t|��z}|���s||}||}t|��|krtjSt
|��}t
|��}t	j|||���dS)Nz&Operands to nancov must have same sizer�r0r�)rmr�r!r�r�rGr�cov)r�r�r�r+r�s     r-�nancovr�rs����1�v�v��Q������E�F�F�F������!�H�H�u�Q�x�x��E��9�9�;�;��
�e�H��
�e�H��
�1�v�v�����v�
�����A�����A�
�6�!�Q�T�"�"�"�4�(�(r/c���t|tj���r|jjdvr!|�tj��}�n�|jtkr�tj	|��}|dvrtd|�d����	|�tj��}tjtj
|����s|j}�n#ttf$rJ	|�tj��}n&#t$r}td|�d���|�d}~wwxYwYn�wxYwn�t!|��s�t#|��s�t%|��s�t|t&��rtd|�d����	t)|��}nN#ttf$r:	t+|��}n&#t$r}td|�d���|�d}~wwxYwYnwxYw|S)Nr�rzCould not convert rzCould not convert string 'z' to numeric)r�r�r�r7r�r�r�r�rrrO�
complex128rL�imag�realrPrrrrr��complex)r�r r!s   r-rr�s6���!�R�Z� � �N��7�<�5� � ������$�$�A�A�
�W��
�
���q�)�)�H��.�.�.�� C�Q� C� C� C�D�D�D�

��H�H�R�]�+�+���v�b�g�a�j�j�)�)����A����z�*�
R�
R�
R�R������,�,�A�A��!�R�R�R�#�$G��$G�$G�$G�H�H�c�Q�����R�����A�
R����� �q�k�k�N�Z��]�]�N�j��m�m�N��a����	J��H��H�H�H�I�I�I�	N��a���A�A���:�&�	N�	N�	N�
N��A�J�J�����
N�
N�
N�� C�Q� C� C� C�D�D�#�M�����
N������	N����
�Hsl�C�D0�'D�D0�
D*�D%�%D*�*D0�/D0�
F�G%�,F<�;G%�<
G�G�G�G%�$G%rc	�.�tjdtjftjjtjtjftjdtjftjjtjtjfi|\}}|jj	dvsJ�|rkt|jjtjtj
f��s;|���}t|��}|||<||d���}|||<n
||d���}|S)a
    Cumulative function with skipna support.

    Parameters
    ----------
    values : np.ndarray or ExtensionArray
    accum_func : {np.cumprod, np.maximum.accumulate, np.cumsum, np.minimum.accumulate}
    skipna : bool

    Returns
    -------
    np.ndarray or ExtensionArray
    g�?gr�rr�)r��cumprodrG�maximum�
accumulater��cumsum�minimumr7r�r@r5r��bool_r�r)rK�
accum_funcrg�mask_a�mask_b�valsrlrws        r-�
na_accum_funcr��s���	�
�S�"�&�M�
�
�������0�
�	�C���=�
�
������/�	�
��N�F�F��<��D�(�(�(�(��,�j���!2�R�Z���4J�K�K�,��{�{�}�}���D�z�z����T�
���D�q�)�)�)����t�����F��+�+�+���Mr/)T)r%r&r'r()r7rrbrr'r&r[)NN)r7rr�r�)rKrhrgr&rlr�r'r�)NNN)rKrhrgr&r�rr�r�rlr�r'r�)r7r�r'r�)r7rr'r&r*)r7r�)r�rr'r)rKrhrfrir'r�)
rKrhrfrirgr&rlr�r'r&)rKrhrfrirgr&rkr�rlr�r'r�)
rwr�rfrirlr�r�rhr'r�)
rKrhrfrirgr&rlr�r'r�)rfrirgr&)r�rrfr
r'rh)r*rrlr�rfrir+r�r7r�r'r,)rfrirgr&r+r�)rKrhrfrirgr&r+r�)rKrhrfrirgr&r+r�rlr�r'r�)
rKrhrfrirgr&rlr�r'rH)
rwrhrfrirlr�rgr&r'ri)
r*rrlr�rfrir7rmr'rn)r�)rwrqrfrirlr�r�rrrkr�r'rq)r�rrrlr�rkr�r'r&)
r�rhr�rhr�rr�r�r'r�)r�rr'r�)
r�rhr�rhr�r�r+r�r'r�)rKrrgr&r'r)]�
__future__rrXrI�typingrrrr��numpyr��pandas._configr�pandas._libsrr	r
r�pandas._typingrr
rrrrrrr�pandas.compat._optionalr�pandas.util._exceptionsr�pandas.core.dtypes.commonrrrrrrrr�pandas.core.dtypes.missingrr r!r{r+r,r.r1r`rrrtr�r�r�r�r�r�r�rqr�r�r�r�r�r�rrr7r�r/r6r4r>rD�nanmin�nanmaxrMrQr^rfr�rKrr�rwrWr�r�r�rr�r~r/r-�<module>r�s���"�"�"�"�"�"�������������������
��������%�%�%�%�%�%�������������
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�?�>�>�>�>�>�4�4�4�4�4�4�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	����������� ���V�<�<�<���$������������:�:�6�7�7�8�8�8���������>5�5�5�5�5�5�5�5�p����(
�
�
�
�GK������,)�)�)�)�^�!%�)-�D�D�D�D�D�N	�	�	�	�2�2�2�2�&�&�&�&�&�R����DE�E�E�E�>����J ��)-�:�:�:�:�:�:�@ ��)-�:�:�:�:�:�:�z
��$����� ���)-�
*�*�*�*�*�������*�Z����&����� ��)-�<�<�<�<�<�����<�~����04�T�PT�_%�_%�_%�_%�_%���_%�D����8�b�h�r�z�*�*�/�/�/�/�/�d������ ���	
�
*-�*-�*-�*-�*-���*-�Z
��$���������� ���	
�
F�F�F�F�F�����F�R
��$���� ���)-�
1)�1)�1)�1)�1)���1)�h���.
��E�&�	1�	1�	1��	��E�&�	1�	1�	1�� ��)-�+�+�+�+�+�+�b ��)-�+�+�+�+�+�+�\
��$����� ��)-�S�S�S�S�S�����S�l
��$����� ��)-�\�\�\�\�\�����\�~
��$����� ���)-�
(�(�(�(�(�����(�V����>$,�2�8�B�J�#7�#7�	&+�&+�&+�&+�&+�\�-�-�-�-�-�`����>A�A�A�
��$����
!*�"���������>����@
��$����
#��)�)�)�)�)���)�6!
�!
�!
�H"�"�"�"�"�"r/