HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/pandas/core/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/pandas/core/__pycache__/algorithms.cpython-36.pyc
3

���h��-@s�UdZddlZddlmZddlmZmZmZmZm	Z	ddl
mZmZm
Z
ddlZddlmZmZmZmZmZddlmZmZmZddlmZdd	lmZmZm Z dd
l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:ddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBddlCmDZDmEZEdd
lFmGZGmHZHddlImJZJe�rpddlKmLZLiZMeeNeNfMdxeeeejOefd�dd�ZPeeeed�dd�ZQdd�ZRejSejTejUejVejWd�ZXdd�ZYdd�ZZdd�Z[eNd�d d!�Z\d"d#�Z]e]Z^eeejOd$�d%d&�Z_dze`eejOejOfd(�d)d*�Zaeed+�ed,�ed-�d.�d|ebee`ee`eejOe	ejOe>ffd0�d1d2��Zcd}ebebebebd4d5�d6d7�Zdebd8�d9d:�Zed~ejOd�d<d=�Zfdebd4d>�d?d@�Zgd�e`eNeNebebdC�dDdE�Zhd�dFdG�Zid�dIdJ�ZjGdKdL�dL�ZkGdMdN�dNek�ZlGdOdP�dPek�Zmd�dQdR�ZndSdT�ZodUdV�Zpe`dW�dXdY�Zqd�ejrd�ejsd�ejtd�ejud�ejvd�ejwd�ejxd�ejyd�ejzd�ej{d�ej|d�ej}d�ej~d�ejd�ej�d�ej�d�ej�d�enej�ej�ej��d�enej�ej�d�d�enej}ej�ej�ej��iZ�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�enej�ej�ej��d�enej�ej�d�d�enej�ej�ej�ej�dc�iZ�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�enej�ej�ej��d�enej�ej�d�d�enej�ej�ej�ej�dc�iZ�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�ej�d�enej�ej�ej��d�enej�ej�d�d�enej�ej�ej�ej�dc�iZ�d�e`e`dd�dedf�Z�d�e`ebdg�dhdi�Z�ddej�d3fe`ebdg�djdk�Z�e�Z�ej�fdldm�Z�d�dodp�Z�d]d_d\d[d^dZhZ�d�e`e`dr�dsdt�Z�d�e`ebebe	ejOeejOejOffdu�dvdw�Z�dS)�zl
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
�N)�dedent)�
TYPE_CHECKING�Dict�Optional�Tuple�Union)�catch_warnings�simplefilter�warn)�	Timestamp�algos�	hashtable�iNaT�lib)�AnyArrayLike�	ArrayLike�DtypeObj)�doc)�'construct_1d_object_array_from_listlike�infer_dtype_from_array�
maybe_promote)�ensure_float64�ensure_int64�
ensure_object�ensure_platform_int�
ensure_uint64�
is_array_like�
is_bool_dtype�is_categorical_dtype�is_complex_dtype�is_datetime64_dtype�is_datetime64_ns_dtype�is_extension_array_dtype�is_float_dtype�
is_integer�is_integer_dtype�is_list_like�is_numeric_dtype�is_object_dtype�is_period_dtype�	is_scalar�is_signed_integer_dtype�is_timedelta64_dtype�is_unsigned_integer_dtype�needs_i8_conversion�pandas_dtype)�ABCDatetimeArray�ABCExtensionArray�ABCIndex�
ABCIndexClass�
ABCMultiIndex�	ABCSeries�ABCTimedeltaArray)�isna�na_value_for_dtype)�array�
extract_array)�validate_indices)�Series)�dtype�returncCs�t|t�st|dd�}t|�r6ttj|��tjd�fSt|�r^|dkr^ttj|��tjd�fSy�t|�spt|�r�tj|�j	d�tjd�fSt
|�s�t
|�r�t|�tjd�fSt|�s�t|�r�t
|�tjd�fSt|�s�t|�r�t|�tjd�fSt|��st|��r8t��td	tj�t|�}WdQRX|tjd�fSWn*tttfk
�rdt|�tjd�fSXt|d
d�}t|��s�t|��r8t|��s�t|��r�ddlm}||�}|j}nxt|��s�t|��r�dd
lm}||�}|j}nH|jdk�rt|��r|j d�}|j}||fSddlm!}||�}|j}|j"|fSt#|��rtt#|��sV|dk�rt|j$}t%d�}t|�}||fStj|t&d�}t|�tjd�fS)a
    routine to ensure that our data is of the correct
    input dtype for lower-level routines

    This will coerce:
    - ints -> int64
    - uint -> uint64
    - bool -> uint64 (TODO this should be uint8)
    - datetimelike -> i8
    - datetime64tz -> i8 (in local tz)
    - categorical -> codes

    Parameters
    ----------
    values : array-like
    dtype : pandas_dtype, optional
        coerce to this dtype

    Returns
    -------
    values : ndarray
    pandas_dtype : np.dtype or ExtensionDtype
    T)�
extract_numpy�objectN�uint64�bool�int64�float64�ignorer=r)�PeriodIndex)�TimedeltaIndex��i8)�
DatetimeIndex�category)r=)'�
isinstancer4r:r(r�np�asarrayr=r�astyper+rr-rr#rrrr	ZComplexWarning�	TypeError�
ValueError�
OverflowError�getattrr.r)�pandasrFr,rG�ndimr!�viewrJ�asi8r�codesr/r@)�valuesr=Z
vals_dtyperFrGrWrJ�rZ�8/tmp/pip-build-5_djhm0z/pandas/pandas/core/algorithms.py�_ensure_dataGs`



r\)rYr=�originalr>cCs�t|t�r|j|kr|St|�rL|j�}t||�r@|j|kr@|S|j|�}n`t|�r||j|dd�}t|t�r�|jt	dd�}n0|dk	r�t
|�r�d}nt|�r�d}|j|dd�}|S)z�
    reverse of _ensure_data

    Parameters
    ----------
    values : np.ndarray or ExtensionArray
    dtype : np.ndtype or ExtensionDtype
    original : AnyArrayLike

    Returns
    -------
    ExtensionArray or np.ndarray
    F)�copyNzdatetime64[ns]ztimedelta64[ns])rLr1r=r"Zconstruct_array_typeZ_from_sequencerrOr3r@r r,)rYr=r]�clsrZrZr[�_reconstruct_data�s$
r`cCsHt|�sDtj|dd�}|dkr:t|t�r0t|�}t|�}n
tj|�}|S)z5
    ensure that we are arraylike if not already
    F)�skipna�mixed�string)rbrc)	rr�infer_dtyperL�tuple�listrrMrN)rY�inferredrZrZr[�_ensure_arraylike�s


rh)rDrArCrcr@cCs$t|�\}}t|�}t|}||fS)z�
    Parameters
    ----------
    values : arraylike

    Returns
    -------
    htable : HashTable subclass
    values : ndarray
    )r\�_check_object_for_strings�_hashtables)rY�_�ndtype�htablerZrZr[�_get_hashtable_algo�srncCs t|�r|j�}t|�\}}|S)N)rZ_values_for_rankr\)rYrkrZrZr[�_get_values_for_rank	srocCs(t|�}t|�}tj|td�}||fS)Nr@)rorirj�get)rYrlrmrZrZr[�_get_data_algosrq)r>cCs*|jj}|dkr&tj|dd�dkr&d}|S)z�
    Check if we can use string hashtable instead of object hashtable.

    Parameters
    ----------
    values : ndarray
    ndtype : str

    Returns
    -------
    str
    r@F)rarc)rc)r=�namerrd)rYrlrZrZr[ris

ricCsPt|�}t|�r|j�S|}t|�\}}|t|��}|j|�}t||j|�}|S)ai	
    Hash table-based unique. Uniques are returned in order
    of appearance. This does NOT sort.

    Significantly faster than numpy.unique. Includes NA values.

    Parameters
    ----------
    values : 1d array-like

    Returns
    -------
    numpy.ndarray or ExtensionArray

        The return can be:

        * Index : when the input is an Index
        * Categorical : when the input is a Categorical dtype
        * ndarray : when the input is a Series/ndarray

        Return numpy.ndarray or ExtensionArray.

    See Also
    --------
    Index.unique : Return unique values from an Index.
    Series.unique : Return unique values of Series object.

    Examples
    --------
    >>> pd.unique(pd.Series([2, 1, 3, 3]))
    array([2, 1, 3])

    >>> pd.unique(pd.Series([2] + [1] * 5))
    array([2, 1])

    >>> pd.unique(pd.Series([pd.Timestamp('20160101'),
    ...                     pd.Timestamp('20160101')]))
    array(['2016-01-01T00:00:00.000000000'], dtype='datetime64[ns]')

    >>> pd.unique(pd.Series([pd.Timestamp('20160101', tz='US/Eastern'),
    ...                      pd.Timestamp('20160101', tz='US/Eastern')]))
    array([Timestamp('2016-01-01 00:00:00-0500', tz='US/Eastern')],
          dtype=object)

    >>> pd.unique(pd.Index([pd.Timestamp('20160101', tz='US/Eastern'),
    ...                     pd.Timestamp('20160101', tz='US/Eastern')]))
    DatetimeIndex(['2016-01-01 00:00:00-05:00'],
    ...           dtype='datetime64[ns, US/Eastern]', freq=None)

    >>> pd.unique(list('baabc'))
    array(['b', 'a', 'c'], dtype=object)

    An unordered Categorical will return categories in the
    order of appearance.

    >>> pd.unique(pd.Series(pd.Categorical(list('baabc'))))
    [b, a, c]
    Categories (3, object): [b, a, c]

    >>> pd.unique(pd.Series(pd.Categorical(list('baabc'),
    ...                                    categories=list('abc'))))
    [b, a, c]
    Categories (3, object): [b, a, c]

    An ordered Categorical preserves the category ordering.

    >>> pd.unique(pd.Series(pd.Categorical(list('baabc'),
    ...                                    categories=list('abc'),
    ...                                    ordered=True)))
    [b, a, c]
    Categories (3, object): [a < b < c]

    An array of tuples

    >>> pd.unique([('a', 'b'), ('b', 'a'), ('a', 'c'), ('b', 'a')])
    array([('a', 'b'), ('b', 'a'), ('a', 'c')], dtype=object)
    )rhr"�uniquern�lenr`r=)rYr]rm�table�uniquesrZrZr[rs7sN
rs)�compsrYr>c
Cs�t|�stdt|�j�d���t|�s<tdt|�j�d���t|ttttj	f�s\t
t|��}t|dd�}t
|�rz|j|�St|�\}}t||d�\}}tj}t|�dkr�t|�r�t|�j�r�dd�}ntj}n�t|��r4y&|jd	d
d�}|jd	d
d�}tj}Wn0tttfk
�r0|jt�}|jt�}YnXn`t|��r�y&|jdd
d�}|jdd
d�}tj}Wn.ttfk
�r�|jt�}|jt�}YnX|||�S)
z�
    Compute the isin boolean array.

    Parameters
    ----------
    comps : array-like
    values : array-like

    Returns
    -------
    ndarray[bool]
        Same length as `comps`.
    zIonly list-like objects are allowed to be passed to isin(), you passed a [�]T)r?)r=i@BcSstjtj||�tj|��S)N)rM�
logical_or�in1d�isnan)�c�vrZrZr[�<lambda>�szisin.<locals>.<lambda>rCF)r^rD)r&rP�type�__name__rLr2r5r1rM�ndarrayrrfr:r�isinr\rmZismember_objectrtr(r7�anyrzr%rOZismember_int64rQrRr@r#Zismember_float64)rwrYr=rk�frZrZr[r��sF







r�rH)�na_sentinelr>c	CsBt|�\}}||pt|��}|j||||d�\}}t|�}||fS)aR
    Factorize an array-like to codes and uniques.

    This doesn't do any coercion of types or unboxing before factorization.

    Parameters
    ----------
    values : ndarray
    na_sentinel : int, default -1
    size_hint : int, optional
        Passed through to the hashtable's 'get_labels' method
    na_value : object, optional
        A value in `values` to consider missing. Note: only use this
        parameter when you know that you don't have any values pandas would
        consider missing in the array (NaN for float data, iNaT for
        datetimes, etc.).
    mask : ndarray[bool], optional
        If not None, the mask is used as indicator for missing values
        (True = missing, False = valid) instead of `na_value` or
        condition "val != val".

    Returns
    -------
    codes : ndarray
    uniques : ndarray
    )r��na_value�mask)rqrt�	factorizer)	rYr��	size_hintr�r��
hash_klassrurvrXrZrZr[�_factorize_array�sr�z�    values : sequence
        A 1-D sequence. Sequences that aren't pandas objects are
        coerced to ndarrays before factorization.
    zt    sort : bool, default False
        Sort `uniques` and shuffle `codes` to maintain the
        relationship.
    zG    size_hint : int, optional
        Hint to the hashtable sizer.
    )rY�sortr�F)r�r�r�r>cCs�t|�}|}t|t�s"t|dd�}d}|dkr6d}d}t|ttf�r�|jdk	r�|j|d�\}}t|t�rx|j	|dd�}nt|t
�r�dd	lm}||�}||fSt
|j�r�|j|d
�\}}|j}	n<t|�\}}	|jjdkr�t|j�}
nd}
t||||
d
�\}}|�r&t|�dk�r&t|||ddd�\}}||k}|�rr|j��rrt|jdd�}
tj||
g�}tj|t|�d|�}t||	|�}t|t��r�|j	|dd�}n t|t
��r�dd	lm}||�}||fS)a
    Encode the object as an enumerated type or categorical variable.

    This method is useful for obtaining a numeric representation of an
    array when all that matters is identifying distinct values. `factorize`
    is available as both a top-level function :func:`pandas.factorize`,
    and as a method :meth:`Series.factorize` and :meth:`Index.factorize`.

    Parameters
    ----------
    {values}{sort}
    na_sentinel : int or None, default -1
        Value to mark "not found". If None, will not drop the NaN
        from the uniques of the values.

        .. versionchanged:: 1.1.2
    {size_hint}
    Returns
    -------
    codes : ndarray
        An integer ndarray that's an indexer into `uniques`.
        ``uniques.take(codes)`` will have the same values as `values`.
    uniques : ndarray, Index, or Categorical
        The unique valid values. When `values` is Categorical, `uniques`
        is a Categorical. When `values` is some other pandas object, an
        `Index` is returned. Otherwise, a 1-D ndarray is returned.

        .. note ::

           Even if there's a missing value in `values`, `uniques` will
           *not* contain an entry for it.

    See Also
    --------
    cut : Discretize continuous-valued array.
    unique : Find the unique value in an array.

    Examples
    --------
    These examples all show factorize as a top-level method like
    ``pd.factorize(values)``. The results are identical for methods like
    :meth:`Series.factorize`.

    >>> codes, uniques = pd.factorize(['b', 'b', 'a', 'c', 'b'])
    >>> codes
    array([0, 0, 1, 2, 0]...)
    >>> uniques
    array(['b', 'a', 'c'], dtype=object)

    With ``sort=True``, the `uniques` will be sorted, and `codes` will be
    shuffled so that the relationship is the maintained.

    >>> codes, uniques = pd.factorize(['b', 'b', 'a', 'c', 'b'], sort=True)
    >>> codes
    array([1, 1, 0, 2, 1]...)
    >>> uniques
    array(['a', 'b', 'c'], dtype=object)

    Missing values are indicated in `codes` with `na_sentinel`
    (``-1`` by default). Note that missing values are never
    included in `uniques`.

    >>> codes, uniques = pd.factorize(['b', None, 'a', 'c', 'b'])
    >>> codes
    array([ 0, -1,  1,  2,  0]...)
    >>> uniques
    array(['b', 'a', 'c'], dtype=object)

    Thus far, we've only factorized lists (which are internally coerced to
    NumPy arrays). When factorizing pandas objects, the type of `uniques`
    will differ. For Categoricals, a `Categorical` is returned.

    >>> cat = pd.Categorical(['a', 'a', 'c'], categories=['a', 'b', 'c'])
    >>> codes, uniques = pd.factorize(cat)
    >>> codes
    array([0, 0, 1]...)
    >>> uniques
    ['a', 'c']
    Categories (3, object): ['a', 'b', 'c']

    Notice that ``'b'`` is in ``uniques.categories``, despite not being
    present in ``cat.values``.

    For all other pandas objects, an Index of the appropriate type is
    returned.

    >>> cat = pd.Series(['a', 'a', 'c'])
    >>> codes, uniques = pd.factorize(cat)
    >>> codes
    array([0, 0, 1]...)
    >>> uniques
    Index(['a', 'c'], dtype='object')

    If NaN is in the values, and we want to include NaN in the uniques of the
    values, it can be achieved by setting ``na_sentinel=None``.

    >>> values = np.array([1, 2, 1, np.nan])
    >>> codes, uniques = pd.factorize(values)  # default: na_sentinel=-1
    >>> codes
    array([ 0,  1,  0, -1])
    >>> uniques
    array([1., 2.])

    >>> codes, uniques = pd.factorize(values, na_sentinel=None)
    >>> codes
    array([0, 1, 0, 2])
    >>> uniques
    array([ 1.,  2., nan])
    T)r?NrHF)r�)rrr)�Index)r��m�M)r�r�r�)r��
assume_unique�verify)�compat���)r�r�)rhrLr4r:r0r6�freqr�r3Z
_shallow_copyr5rTr�r"r=r\�kindr8r�rt�	safe_sortr�rM�append�wherer`)rYr�r�r�r]�dropnarXrvr�r=r�Z
code_is_narZrZr[r�sT




r�Tr<)r��	ascending�	normalizer�r>cCsFddlm}t|dd�}|dk	r�ddlm}||�}y|||dd�}	Wn,tk
rr}
ztd�|
�WYdd}
~
XnX|	j|d	�}||jj�}|jj	d
�|_|j
�}|r�|jdkj�r�|j
dd�}tjt|	�g�}nDt|�r�||�jj|d	�}||_|j}nt||�\}
}|||
|d�}|�r,|j|d�}|�rB|t|j��}|S)
aK
    Compute a histogram of the counts of non-null values.

    Parameters
    ----------
    values : ndarray (1-d)
    sort : bool, default True
        Sort by values
    ascending : bool, default False
        Sort in ascending order
    normalize: bool, default False
        If True then compute a relative histogram
    bins : integer, optional
        Rather than count values, group them into half-open bins,
        convenience for pd.cut, only works with numeric data
    dropna : bool, default True
        Don't include counts of NaN

    Returns
    -------
    Series
    r)r<rrN)�cutT)Zinclude_lowestz+bins argument only works with numeric data.)r��interval)�indexrr)r�)Zpandas.core.seriesr<rSZpandas.core.reshape.tiler�rP�value_countsr�ZnotnarOZ
sort_index�_values�all�ilocrMr9rtr"rr�_value_counts_arraylike�sort_values�float�sum)rYr�r�r�Zbinsr�r<rrr��ii�err�result�counts�keysrZrZr[r��s6r�)r�c
Cs�t|�}|}t|�\}}|jj}t|j�rZtj||�\}}|r�|tk}||||}}nbttd|���}|||�\}}t	|�}	|r�|	j
�r�t	|�j
�s�tj|dtj
�}tj|d|	j��}t||j|�}||fS)z�
    Parameters
    ----------
    values : arraylike
    dropna : bool

    Returns
    -------
    uniques : np.ndarray or ExtensionArray
    counts : np.ndarray
    Zvalue_count_r)rhr\r=rrr.rmZvalue_count_int64rrSr7r�rM�insert�NaNr�r`)
rYr�r]rkrlr�r�Zmskr�r�rZrZr[r�+s$
r��firstcCs0t|�\}}|jj}ttd|���}|||d�S)a�
    Return boolean ndarray denoting duplicate values.

    Parameters
    ----------
    values : ndarray-like
        Array over which to check for duplicate values.
    keep : {'first', 'last', False}, default 'first'
        - ``first`` : Mark duplicates as ``True`` except for the first
          occurrence.
        - ``last`` : Mark duplicates as ``True`` except for the last
          occurrence.
        - False : Mark all duplicates as ``True``.

    Returns
    -------
    duplicated : ndarray
    Zduplicated_)�keep)r\r=rrrSrm)rYr�rkrlr�rZrZr[�
duplicatedWsr�)r�r>c
Cs�ddlm}t|�}|}t|�rNt||�rB||jj|d�|jd�S|j|d�S|rnt|j	�rn|j
�}||}t|�\}}|j	j}tt
d|���}|||d�}ytj|�}Wn0tk
r�}	ztd|	���WYdd}	~	XnXt||j	|�}||�S)a3
    Returns the mode(s) of an array.

    Parameters
    ----------
    values : array-like
        Array over which to check for duplicate values.
    dropna : boolean, default True
        Don't consider counts of NaN/NaT.

        .. versionadded:: 0.24.0

    Returns
    -------
    mode : Series
    r)r<)r�)rrZmode_zUnable to sort modes: N)rTr<rhrrLr��moderrr.r=Zisnullr\rSrmrMr�rPr
r`)
rYr�r<r]r�rkrlr�r�r�rZrZr[r�ps(

 r��averager�)�axis�method�	na_optionr��pctcCs^|jdkr(t|�}tj|||||d�}n2|jdkrRt|�}tj||||||d�}ntd��|S)a�
    Rank the values along a given axis.

    Parameters
    ----------
    values : array-like
        Array whose values will be ranked. The number of dimensions in this
        array must not exceed 2.
    axis : int, default 0
        Axis over which to perform rankings.
    method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
        The method by which tiebreaks are broken during the ranking.
    na_option : {'keep', 'top'}, default 'keep'
        The method by which NaNs are placed in the ranking.
        - ``keep``: rank each NaN value with a NaN ranking
        - ``top``: replace each NaN with either +/- inf so that they
                   there are ranked at the top
    ascending : boolean, default True
        Whether or not the elements should be ranked in ascending order.
    pct : boolean, default False
        Whether or not to the display the returned rankings in integer form
        (e.g. 1, 2, 3) or in percentile form (e.g. 0.333..., 0.666..., 1).
    rH)�ties_methodr�r�r��)r�r�r�r�r�z&Array with ndim > 2 are not supported.)rUrorZrank_1dZrank_2drP)rYr�r�r�r�r�ZranksrZrZr[�rank�s&



r�c
CsXtj||j�}|dk	r&tj||j�}nd}|dk	rJ|dk	rJtj||B�}nB|dk	r^tj|�}n.|dk	rrtj|�}ntj|jtd�}|jd�|dk}|dk}|j�s�tjtj	�j
||k|@j�}	n~|j�s�tjtj	�j||k|@j�}	nVtjtj	�j||||k||@j��p@tjtj	�j
||||k||@j�}	|	�rPtd��||S)a�
    Perform array addition that checks for underflow and overflow.

    Performs the addition of an int64 array and an int64 integer (or array)
    but checks that they do not result in overflow first. For elements that
    are indicated to be NaN, whether or not there is overflow for that element
    is automatically ignored.

    Parameters
    ----------
    arr : array addend.
    b : array or scalar addend.
    arr_mask : boolean array or None
        array indicating which elements to exclude from checking
    b_mask : boolean array or boolean or None
        array or scalar indicating which element(s) to exclude from checking

    Returns
    -------
    sum : An array for elements x + b for each element x in arr if b is
          a scalar or an array for elements x + y for each element pair
          (x, y) in (arr, b).

    Raises
    ------
    OverflowError if any x + y exceeds the maximum or minimum int64 value.
    N)r=TrzOverflow in int64 addition)
rMZbroadcast_to�shapeZlogical_not�emptyrB�fillr��iinforC�min�maxrR)
�arr�bZarr_maskZb_maskZb2Zb2_maskZnot_nanZmask1Zmask2Zto_raiserZrZr[�checked_add_with_arr�s.
	  ,*r��fractioncs�tj|�}t|�}||}tj|��dd�����fdd��t|�rN�|�Stj|tj�}�fdd�|D�}tj|tjd�}|SdS)	a�
    Compute sample quantile or quantiles of the input array. For example, q=0.5
    computes the median.

    The `interpolation_method` parameter supports three values, namely
    `fraction` (default), `lower` and `higher`. Interpolation is done only,
    if the desired quantile lies between two data points `i` and `j`. For
    `fraction`, the result is an interpolated value between `i` and `j`;
    for `lower`, the result is `i`, for `higher` the result is `j`.

    Parameters
    ----------
    x : ndarray
        Values from which to extract score.
    q : scalar or array
        Percentile at which to extract score.
    interpolation_method : {'fraction', 'lower', 'higher'}, optional
        This optional parameter specifies the interpolation method to use,
        when the desired quantile lies between two data points `i` and `j`:

        - fraction: `i + (j - i)*fraction`, where `fraction` is the
                    fractional part of the index surrounded by `i` and `j`.
        -lower: `i`.
        - higher: `j`.

    Returns
    -------
    score : float
        Score at percentile.

    Examples
    --------
    >>> from scipy import stats
    >>> a = np.arange(100)
    >>> stats.scoreatpercentile(a, 50)
    49.5

    cSs||||S)z|
        Returns the point at the given fraction between a and b, where
        'fraction' must be between 0 and 1.
        rZ)�ar�r�rZrZr[�_interpolateQszquantile.<locals>._interpolatecs�t��dkrtjS|t��d}|ddkr<�t|�}nf�dkrj��t|��t|�d|d�}n8�dkr��tj|�}n �dkr��tj|�}ntd��|S)NrrHr��lowerZhigherzAinterpolation_method can only be 'fraction' , 'lower' or 'higher')rtrM�nan�int�floor�ceilrQ)Zat�idxZscore)r��interpolation_methodrYrZr[�
_get_scoreXs&zquantile.<locals>._get_scorecsg|]}�|��qSrZrZ)�.0�x)r�rZr[�
<listcomp>rszquantile.<locals>.<listcomp>)r=N)rMrNr7r�r*rDr9)r��qr�r�r�rZ)r�r�r�rYr[�quantile#s'


r�c@s@eZdZeed�dd�Zdd�Zdd�Zee	e
d�d	d
��ZdS)�SelectN)�nr�cCs(||_||_||_|jdkr$td��dS)Nr��lastr�z,keep must be either "first", "last" or "all")r�r�r�)�objr�r�rQ)�selfr�r�r�rZrZr[�__init__}s

zSelectN.__init__cCs
|jd�S)N�nlargest)�compute)r�rZrZr[r��szSelectN.nlargestcCs
|jd�S)N�	nsmallest)r�)r�rZrZr[r��szSelectN.nsmallest)r=r>cCst|�rt|�pt|�S)zg
        Helper function to determine if dtype is valid for
        nsmallest/nlargest methods
        )r'rr.)r=rZrZr[�is_valid_dtype_n_method�szSelectN.is_valid_dtype_n_methodN)r��
__module__�__qualname__r��strr�r�r��staticmethodrrBr�rZrZrZr[r�|s
r�c@seZdZdZdd�ZdS)�
SelectNSeriesz�
    Implement n largest/smallest for Series

    Parameters
    ----------
    obj : Series
    n : int
    keep : {'first', 'last'}, default 'first'

    Returns
    -------
    nordered : Series
    cCs�|j}|jj}|j|�s,td|�d|����|dkr>|jgS|jj�}|t|j�kr�|jdkpf|dk}|dk}|r�tj	ddd�ntj	dd�}||j
|d�j|�St|j
�\}}	|dkr�|}t|	�r�|d8}nt|	�r�d|}|jdk�r|ddd
�}t|�}
t||
�}tj|j�|d�}tj||k�\}|||jd	d
�}
|jdk�rd|
d|�}
|jdk�r||
d|
}
|j|
S)NzCannot use method 'z
' with dtype rr�r�r�rH)r��	mergesort)r�r�r�r�)r�r�r=r�rPr�rtr�rMZs_r��headr\rYr%rr�rZkth_smallestr^Znonzero�argsortr�)r�r�r�r=ZdroppedZ
reverse_itr�Zslcr�r/ZnarrZkth_val�nsZindsrZrZr[r��s>


"


zSelectNSeries.computeN)r�r�r��__doc__r�rZrZrZr[r��s
r�cs0eZdZdZeed��fdd�Zdd�Z�ZS)�SelectNFramez�
    Implement n largest/smallest for DataFrame

    Parameters
    ----------
    obj : DataFrame
    n : int
    keep : {'first', 'last'}, default 'first'
    columns : list or str

    Returns
    -------
    nordered : DataFrame
    )r�r�cs<t�j|||�t|�s$t|t�r*|g}t|�}||_dS)N)�superr�r&rLrerf�columns)r�r�r�r�r�)�	__class__rZr[r��s
zSelectNFrame.__init__c	s�ddlm}|j}|j}|j}xD|D]<}||j}|j|�s$tdt|��d|�dt���d���q$W�fdd�}|j	}	|j
d	d
�}
}|}|g�}x�t|�D]�\}
}|
|}t|�d|
k}t
|��||r�|jndd
�}|s�t|�|kr�|||j	�}P|||j	dk}||}||}|||j	�}|
j|j	}
|t|�}q�W|j|�}|	j|�|_	t|�dk�rj|S�dk}|j||dd�S)Nr)�
Int64IndexzColumn z has dtype z, cannot use method z with this dtypecs �dkr|j|�S|j|�SdS)z{
            Helper function to concat `current_indexer` and `other_indexer`
            depending on `method`
            r�N)r�)Zcurrent_indexerZ
other_indexer)r�rZr[�get_indexer�s
z)SelectNFrame.compute.<locals>.get_indexerT)ZdroprHr�)r�r�r�)r�r�r�)rTr�r�r�r�r=r�rP�reprr�Zreset_index�	enumeratertrSr��loc�taker�)r�r�r�r��framer��columnr=r�Zoriginal_indexZ	cur_frameZcur_n�indexer�iZseriesZis_last_columnrYZborder_valueZ
unsafe_valuesZsafe_valuesr�rZ)r�r[r��sD


&

zSelectNFrame.compute)	r�r�r�r�r�r�r�r��
__classcell__rZrZ)r�r[r��sr�cstjf����fdd�	}|S)NcsH�dk	r|j��}�dk	r$|j��}�dk	r4�|�}�||||d�dS)N)�
fill_value)rV)r�r��outr�)�	arr_dtyper��	fill_wrap�	out_dtyperZr[�wrapperGs

z_view_wrapper.<locals>.wrapper)rMr�)r�r�r�r�r�rZ)r�r�r�r�r[�
_view_wrapperFs	r�cstjf��fdd�	}|S)Ncs|j��}�||||d�dS)N)r�)rO)r�r�r�r�)�
conv_dtyper�rZr[r�Ts
z!_convert_wrapper.<locals>.wrapper)rMr�)r�r�r�rZ)r�r�r[�_convert_wrapperSsr�cCs�|\}}|dk	r"|\\}}\}	}
n |dk}|dk}|j�}	|j�}
|dk	rr|	r^|||dd�f<|
rr||dd�|f<xNtt|��D]>}||}x0tt|��D] }
||
}|||f|||
f<q�Wq�WdS)NrHr�r�)r��rangert)r�r�r�r��	mask_info�row_idx�col_idx�row_mask�col_mask�	row_needs�	col_needsr�Zu_�jr}rZrZr[�_take_2d_multi_object[s"r)r�c	Cs�|dk	r|\}}n|dk}|j�}|j|jkr:|j|j�}|j|dkr\|jt|�||d�|r�td�g|j}|||<||t|�<dS)NrHr)r�r�r�)	r�r=rOr�r�r�slicerUre)	r�r�r�r�r�rr��
needs_maskingZ
outindexerrZrZr[�_take_nd_objectrs
r�int8�int32rCrD�int16�float32r@rB�datetime64[ns])r�)rUr�cs�|dkr�|j|jf}|dkr*tj|d�}n*|dkrT�dkrHtj|d�}ntj|d�}|dk	r`|S|j|jf}|dkr�tj|d�}n*|dkr��dkr�tj|d�}ntj|d�}|dk	r�t||�}|Stjf��fdd�	}|S)Nr�rHrcs t|�}t|||�|�d�dS)N)r�r�r)rr)r�r�r�r�)r�rrZr[�func2sz$_get_take_nd_function.<locals>.func2)rr�
_take_1d_dictrp�_take_2d_axis0_dict�_take_2d_axis1_dictr�rMr�)rUr�r�r�r�tup�funcrrZ)r�rr[�_get_take_nd_function�s,
r)r��
allow_fillcCs\t|�stj|�}tj|tjd�}|rJt||j|�t|||d|d�}n|j||d�}|S)a�
    Take elements from an array.

    .. versionadded:: 0.23.0

    Parameters
    ----------
    arr : sequence
        Non array-likes (sequences without a dtype) are coerced
        to an ndarray.
    indices : sequence of integers
        Indices to be taken.
    axis : int, default 0
        The axis over which to select values.
    allow_fill : bool, default False
        How to handle negative values in `indices`.

        * False: negative values in `indices` indicate positional indices
          from the right (the default). This is similar to :func:`numpy.take`.

        * True: negative values in `indices` indicate
          missing values. These values are set to `fill_value`. Any other
          other negative values raise a ``ValueError``.

    fill_value : any, optional
        Fill value to use for NA-indices when `allow_fill` is True.
        This may be ``None``, in which case the default NA value for
        the type (``self.dtype.na_value``) is used.

        For multi-dimensional `arr`, each *element* is filled with
        `fill_value`.

    Returns
    -------
    ndarray or ExtensionArray
        Same type as the input.

    Raises
    ------
    IndexError
        When `indices` is out of bounds for the array.
    ValueError
        When the indexer contains negative values other than ``-1``
        and `allow_fill` is True.

    Notes
    -----
    When `allow_fill` is False, `indices` may be whatever dimensionality
    is accepted by NumPy for `arr`.

    When `allow_fill` is True, `indices` should be 1-D.

    See Also
    --------
    numpy.take : Take elements from an array along an axis.

    Examples
    --------
    >>> from pandas.api.extensions import take

    With the default ``allow_fill=False``, negative numbers indicate
    positional indices from the right.

    >>> take(np.array([10, 20, 30]), [0, 0, -1])
    array([10, 10, 30])

    Setting ``allow_fill=True`` will place `fill_value` in those positions.

    >>> take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True)
    array([10., 10., nan])

    >>> take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True,
    ...      fill_value=-10)
    array([ 10,  10, -10])
    )r=T)r�rr�)r�)rrMrNZintpr;r��take_1dr�)r��indicesr�rr�r�rZrZr[r�sL
r�cCs�d}t|�r|j|||d�St|�}tj|�}|dkr`tj|j|tjd�}|j|jj	�}}n�t
|dd�}|s�|j|jj	�}}d
}nxt|j|�\}}||jko�|dks�|j|k�r|dk}|j�}	||	f}|	r�|dk	r�|j|kr�t
d��n|j|jj	�}}d}
|jdk�r|jj�rd	}
|
�rH|j}|j|d}|dk	�rH|j}|dk�r�t|j�}t|�||<t|�}|jj�r�||jdk�r�tj||d
d�}ntj||d�}t|j|j|j||d�}
|
||||�|
�r�|j}|S)a�
    Specialized Cython take which sets NaN values in one pass

    This dispatches to ``take`` defined on ExtensionArrays. It does not
    currently dispatch to ``SparseArray.take`` for sparse ``arr``.

    Parameters
    ----------
    arr : array-like
        Input array.
    indexer : ndarray
        1-D array of indices to take, subarrays corresponding to -1 value
        indices are filed with fill_value
    axis : int, default 0
        Axis to take from
    out : ndarray or None, default None
        Optional output array, must be appropriate type to hold input and
        fill_value together, if indexer has any -1 value entries; call
        maybe_promote to determine this type for any fill_value
    fill_value : any, default np.nan
        Fill value to replace -1 values with
    allow_fill : boolean, default True
        If False, indexer is assumed to contain no -1 values so no filling
        will be done.  This short-circuits computation of a mask.  Result is
        undefined if allow_fill == False and -1 is present in indexer.

    Returns
    -------
    subarray : array-like
        May be the same type as the input, or cast to an ndarray.
    N)r�r)r=F)r^rHz Incompatible type for fill_valuer�T�F)r=�order)r�r)NFr�)r"r�r:rMrN�aranger�rCr=rrrr�rPrU�flags�f_contiguous�Trfrtrer�r)r�r�r�r�r�rrr=r�r
Z
flip_orderZ
out_shape_�	out_shaperrZrZr[�take_ndhsV"





r"c
s`|dk	st�|ddk	st�|ddk	s,t�|\}}t|�}t|�}||f}d�t|j|�\}}||jkr�|dk}|d	k}|j�}|j�}	||f||	ff�|p�|	s�|j|jj�}}t|�t|�f}
tj|
|d�}t	j
|jj|jjfd�}|dk�r0|j|jk�r0t	j
|jj|jjfd�}|dk	�r0t||j�}|dk�rLtj
f�fdd�	}|||||d�|S)
zD
    Specialized Cython take which sets NaN values in one pass.
    NrrH)r=cst||||�d�dS)N)r�r)r)r�r�r�r�)rrZr[rsztake_2d_multi.<locals>.func)r�r�r�r�)�AssertionErrorrrr=r�rrtrMr��_take_2d_multi_dictrprrr�r�)
r�r�r�rrr=rrrrr!r�rrZ)rr[�
take_2d_multi�s8


r%�leftc	Cs(|dk	rt|�}t|tj�r�t|�r�t|�s4t|�r�tj|jj�}t	|�rVtj
|g�ntj
|�}||jkj�r�||j
kj�r�|j}n|j}t	|�r�|j|�}nt
||d�}nht|�p�t|�p�t|��st	|�r�t
|g�nt
|�}t	|�r�|dn|}t|t��r|jdk�r|j�}|j|||d�}|S)a�
    Find indices where elements should be inserted to maintain order.

    .. versionadded:: 0.25.0

    Find the indices into a sorted array `arr` (a) such that, if the
    corresponding elements in `value` were inserted before the indices,
    the order of `arr` would be preserved.

    Assuming that `arr` is sorted:

    ======  ================================
    `side`  returned index `i` satisfies
    ======  ================================
    left    ``arr[i-1] < value <= self[i]``
    right   ``arr[i-1] <= value < self[i]``
    ======  ================================

    Parameters
    ----------
    arr: array-like
        Input array. If `sorter` is None, then it must be sorted in
        ascending order, otherwise `sorter` must be an array of indices
        that sort it.
    value : array_like
        Values to insert into `arr`.
    side : {'left', 'right'}, optional
        If 'left', the index of the first suitable location found is given.
        If 'right', return the last such index.  If there is no suitable
        index, return either 0 or N (where N is the length of `self`).
    sorter : 1-D array_like, optional
        Optional array of integer indices that sort array a into ascending
        order. They are typically the result of argsort.

    Returns
    -------
    array of ints
        Array of insertion points with the same shape as `value`.

    See Also
    --------
    numpy.searchsorted : Similar method from NumPy.
    N)r=r)�side�sorter)rrLrMr�r%r$r�r=rr*r9r�r�r�r(r'rr�tzinfoZ
to_datetime64�searchsorted)	r��valuer'r(r�Z	value_arrr=Z	value_serr�rZrZr[r*s(,r*�)r�r�cCs�ddlm}t|�}tj}|j}|jdkr2tj}ntj	}t
||�rRtj|�}|j}t|�r�t
|d|j�d��r~|||j|��Stdt|d�tj|�}|j}d}d}	t|j�r�tj}|jd�}t}d	}n"t|�r�tj}d	}	nt|�r�tj}tj|�}tj|j|d
�}
td�g|j}|dk�r(td|�nt|d�||<||
t|�<|jdk�rp|jjtk�rpt j!||
||��ntd�g|j}|dk�r�t|d�ntd|�||<t|�}
td�g|j}|dk�r�td|�n
t|d�||<t|�}|�rZ||
}||}||
|k|||kB}|j"��r@|j#�}d||<|j#�}d||<||}|||<||
|
<n0|	�rv||
||A|
|
<n||
|||
|
<|�r�|
j$d
�jd�}
|
S)a1
    difference of n between self,
    analogous to s-s.shift(n)

    Parameters
    ----------
    arr : ndarray
    n : int
        number of periods
    axis : int
        axis to shift on
    stacklevel : int
        The stacklevel for the lost dtype warning.

    Returns
    -------
    shifted
    r)�PandasDtyper��__zwdtype lost in 'diff()'. In the future this will raise a TypeError. Convert to a suitable dtype prior to calling 'diff'.)�
stacklevelFrIT)r=Nr�rCztimedelta64[ns])%Zpandas.core.arraysr-r�rMr�r=r��operator�xor�subrLrNr"�hasattrr��shiftr
�
FutureWarningr.rDrVrrZobject_r%r�r�r	rUrerr�
_diff_specialrZdiff_2dr�r^rO)r�r�r�r/r-�nar=�opZis_timedeltaZis_boolZout_arrZ
na_indexerZ_res_indexerZres_indexerZ_lag_indexerZlag_indexer�resZlagr�r�rZrZr[�diffis|






""&

r:)r�r�r�r>c
Cst|�std��t|tj�rBt|�rBt|�\}}tj||d�}dd�}d}t|�rttj	|dd�dkrt||�}	n4y|j
�}|j|�}	Wntk
r�||�}	YnX|dkr�|	St|�s�td	��ttj|��}|r�t
t|��t
|�kr�td
��|dk�r0t|�\}
}|
t
|��}|j|�t|j|	��}|dk�rx|j
�}t||dd�}
|�rr|t
|�k|t
|�kB}nd}ndtjt
|�tjd�}|j|tjt
|���|j|d
d�}
||k}|�r�||t
|�kB|t
|�kB}|dk	�r�tj|
||�|	t|
�fS)a�
    Sort ``values`` and reorder corresponding ``codes``.

    ``values`` should be unique if ``codes`` is not None.
    Safe for use with mixed types (int, str), orders ints before strs.

    Parameters
    ----------
    values : list-like
        Sequence; must be unique if ``codes`` is not None.
    codes : list_like, optional
        Indices to ``values``. All out of bound indices are treated as
        "not found" and will be masked with ``na_sentinel``.
    na_sentinel : int, default -1
        Value in ``codes`` to mark "not found".
        Ignored when ``codes`` is None.
    assume_unique : bool, default False
        When True, ``values`` are assumed to be unique, which can speed up
        the calculation. Ignored when ``codes`` is None.
    verify : bool, default True
        Check if codes are out of bound for the values and put out of bound
        codes equal to na_sentinel. If ``verify=False``, it is assumed there
        are no out of bound codes. Ignored when ``codes`` is None.

        .. versionadded:: 0.25.0

    Returns
    -------
    ordered : ndarray
        Sorted ``values``
    new_codes : ndarray
        Reordered ``codes``; returned when ``codes`` is not None.

    Raises
    ------
    TypeError
        * If ``values`` is not list-like or if ``codes`` is neither None
        nor list-like
        * If ``values`` cannot be sorted
    ValueError
        * If ``codes`` is not None and ``values`` contain duplicates.
    zFOnly list-like objects are allowed to be passed to safe_sort as values)r=cSsNtjdd�|D�td�}tj||�}tj||�}tj|tj|td�g�S)NcSsg|]}t|t��qSrZ)rLr�)r�r�rZrZr[r�sz1safe_sort.<locals>.sort_mixed.<locals>.<listcomp>)r=)rMr9rBr�ZconcatenaterNr@)rYZstr_pos�nums�strsrZrZr[�
sort_mixedszsafe_sort.<locals>.sort_mixedNF)raz
mixed-integerzMOnly list-like objects or None are allowed to be passed to safe_sort as codesz,values should be unique if codes is not NonerH)r��wrap)r�r�r�)r&rPrLrMr�r"rrNrrdr�r�rrtrsrQrqZ
map_locations�lookuprr��int_�putrZputmask)rYrXr�r�r�r=rkr=r(�orderedr��tZorder2Z	new_codesr�Zreverse_indexerrZrZr[r��sX1





r�)Nr�)r�NNNr�)Fr�N)TFFNT)r�)T)rr�r�TF)NN)r�)NNN)rr)rr
)rrC)rrD)rr)rr
)rrC)rrD)r
r
)r
rC)r
rD)rCrC)rCrD)rr)rrD)rDrD)r@r@)rBrB)rBr@)rr)rr)rr
)rrC)rrD)rr)rr
)rrC)rrD)r
r
)r
rC)r
rD)rCrC)rCrD)rr)rrD)rDrD)r@r@)rBrB)rBr@)rr)rr)rr
)rrC)rrD)rr)rr
)rrC)rrD)r
r
)r
rC)r
rD)rCrC)rCrD)rr)rrD)rDrD)r@r@)rBrB)rBr@)rr)rr)rr
)rrC)rrD)rr)rr
)rrC)rrD)r
r
)r
rC)r
rD)rCrC)rCrD)rr)rrD)rDrD)r@r@)rBrB)rBr@)rr)rN)rFN)r&N)rr,r�)Nr�FT)�r�r0�textwraprZtypingrrrrr�warningsrr	r
ZnumpyrMZpandas._libsrrr
rmrrZpandas._typingrrrZpandas.util._decoratorsrZpandas.core.dtypes.castrrrZpandas.core.dtypes.commonrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/Zpandas.core.dtypes.genericr0r1r2r3r4r5r6Zpandas.core.dtypes.missingr7r8Zpandas.core.constructionr9r:Zpandas.core.indexersr;rTr<Z_shared_docsr�r�r\r`rhZFloat64HashTableZUInt64HashTableZInt64HashTableZStringHashTableZPyObjectHashTablerjrnrorqrirsZunique1dr�r�r�rBr�r�r�r�r�r�r�r�r�r�r�r�r�rrZtake_1d_int8_int8Ztake_1d_int8_int32Ztake_1d_int8_int64Ztake_1d_int8_float64Ztake_1d_int16_int16Ztake_1d_int16_int32Ztake_1d_int16_int64Ztake_1d_int16_float64Ztake_1d_int32_int32Ztake_1d_int32_int64Ztake_1d_int32_float64Ztake_1d_int64_int64Ztake_1d_int64_float64Ztake_1d_float32_float32Ztake_1d_float32_float64Ztake_1d_float64_float64Ztake_1d_object_objectZtake_1d_bool_boolZuint8Ztake_1d_bool_objectrCrZtake_2d_axis0_int8_int8Ztake_2d_axis0_int8_int32Ztake_2d_axis0_int8_int64Ztake_2d_axis0_int8_float64Ztake_2d_axis0_int16_int16Ztake_2d_axis0_int16_int32Ztake_2d_axis0_int16_int64Ztake_2d_axis0_int16_float64Ztake_2d_axis0_int32_int32Ztake_2d_axis0_int32_int64Ztake_2d_axis0_int32_float64Ztake_2d_axis0_int64_int64Ztake_2d_axis0_int64_float64Ztake_2d_axis0_float32_float32Ztake_2d_axis0_float32_float64Ztake_2d_axis0_float64_float64Ztake_2d_axis0_object_objectZtake_2d_axis0_bool_boolZtake_2d_axis0_bool_objectrZtake_2d_axis1_int8_int8Ztake_2d_axis1_int8_int32Ztake_2d_axis1_int8_int64Ztake_2d_axis1_int8_float64Ztake_2d_axis1_int16_int16Ztake_2d_axis1_int16_int32Ztake_2d_axis1_int16_int64Ztake_2d_axis1_int16_float64Ztake_2d_axis1_int32_int32Ztake_2d_axis1_int32_int64Ztake_2d_axis1_int32_float64Ztake_2d_axis1_int64_int64Ztake_2d_axis1_int64_float64Ztake_2d_axis1_float32_float32Ztake_2d_axis1_float32_float64Ztake_2d_axis1_float64_float64Ztake_2d_axis1_object_objectZtake_2d_axis1_bool_boolZtake_2d_axis1_bool_objectrZtake_2d_multi_int8_int8Ztake_2d_multi_int8_int32Ztake_2d_multi_int8_int64Ztake_2d_multi_int8_float64Ztake_2d_multi_int16_int16Ztake_2d_multi_int16_int32Ztake_2d_multi_int16_int64Ztake_2d_multi_int16_float64Ztake_2d_multi_int32_int32Ztake_2d_multi_int32_int64Ztake_2d_multi_int32_float64Ztake_2d_multi_int64_int64Ztake_2d_multi_int64_float64Ztake_2d_multi_float32_float32Ztake_2d_multi_float32_float64Ztake_2d_multi_float64_float64Ztake_2d_multi_object_objectZtake_2d_multi_bool_boolZtake_2d_multi_bool_objectr$rr�r�r"rr%r*r6r:r�rZrZrZr[�<module>sPl$	l)
	]H&$=
I,12
L
YBn

#^g<
Wx