Viewing File: /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/core/__pycache__/_internal.cpython-311.pyc

�

�|oi�n���dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZ	ddlZn
#e
$rdZYnwxYwejjdkZejdkrd	Znd
Zd�Zd�Zd
�Zd�Zejd��Zejd��Zejd��ZdeiZd�ZGd�d��Zd�Zde_Gd�d��Z Gd�d��Z!d�Z"d�Z#d�Z$d�Z%d�Z&id d �d!d"�d#d#�d$d$�d%d%�d&d&�d'd'�d(d(�d)d)�d*d*�d+d+�d,d,�d-d-�d.d.�d/d/�d0d0�d1d2�d3d4d5d6d7d8d9��Z'd:�(e'�)����Z*id d �d!d"�d#d#�d$d$�d%d;�d&d<�d'd=�d(d>�d)d=�d*d>�d+d?�d,d@�d-dA�d.d.�d/d/�d1d2�dBd3�d5d6d7d8dC��Z+d:�(e+�)����Z,dDdEdFdGdH�Z-GdI�dJ��Z.dK�Z/dL�Z0dM�Z1dN�Z2dO�Z3dP�Z4dQ�Z5dR�Z6dS�Z7dT�Z8dU�Z9dS)VzI
A place for internal code

Some things are more easily handled Python.

�N�)�DTypePromotionError�)�dtype�array�ndarray�
promote_types�pypy�little�<�>c�>�g}|���D]�\}}t|��}t|t��r|dvrt	d���|dkr
|d|kr�Ot|d��}|dkrt	d���t
|d|���}|dkr	|d}nd}|�||||f����|�d��	��d
�|D��}	d�|D��}
d�|D��}d
�|D��}|	|
||fS)N)r�zentry not a 2- or 3- tuplerrrzinvalid offset.��alignc��|dS)Nr�)�xs �K/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/core/_internal.py�<lambda>z!_makenames_list.<locals>.<lambda>-s
���1���)�keyc��g|]
}|d��S�rr��.0rs  r�
<listcomp>z#_makenames_list.<locals>.<listcomp>.s��%�%�%�a�Q�q�T�%�%�%rc��g|]
}|d��S�rrrs  rrz#_makenames_list.<locals>.<listcomp>/���'�'�'��q��t�'�'�'rc��g|]
}|d��S)rrrs  rrz#_makenames_list.<locals>.<listcomp>0r rc��g|]
}|d��S)rrrs  rrz#_makenames_list.<locals>.<listcomp>1s��
&�
&�
&�q�a��d�
&�
&�
&r)	�items�len�
isinstance�tuple�
ValueError�intr�append�sort)
�adictr�	allfields�fname�obj�n�num�format�title�names�formats�offsets�titless
             r�_makenames_listr7sU���I��k�k�m�m�6�6�
��s���H�H���#�u�%�%�	;��&����9�:�:�:��q�5�5�S��V�u�_�_���#�a�&�k�k����7�7��.�/�/�/��s�1�v�U�+�+�+���q�5�5���F�E�E��E����%���e�4�5�5�5�5�
�N�N�~�~�N�&�&�&�%�%�9�%�%�%�E�'�'�Y�'�'�'�G�'�'�Y�'�'�'�G�
&�
&�I�
&�
&�
&�F��'�7�F�*�*rc��	|d}n#t$rd}YnwxYw|�t||��\}}}}n�g}g}g}|D]�}||}|�|d��|�|d��t|��dkr|�|d���o|�d����t	||||d�|��S)N���rrr)r3r4r5r6)�KeyErrorr7r)r$r)r+rr3r4r5r6�name�ress        r�
_usefieldsr=8s����b�	�����������������}�*9�%��*G�*G�'��w�����������	$�	$�D���+�C��N�N�3�q�6�"�"�"��N�N�3�q�6�"�"�"��3�x�x�!�|�|��
�
�c�!�f�%�%�%�%��
�
�d�#�#�#�#��5�$�$�"�$�$�&+�,�,�,s���c�j��|j���_|j}|�9|j�|jS|j���}|r	|j|fS|jSt|d��|dfS|j}�fd�|D��}g}d}|D]�}|d|kr+|d|z
}|�dd|��f��||z
}n|d|krtd���t|��dkr|d|df}	n|d}	|djr5|	t|djd��|djdf}
n|	t|d��f}
||dj
z
}|�|
����|j
|kr$|j
|z
}|�dd|��f��|S)	Nrrc�(��g|]}�||fz��Srr)rr�fieldss  �rrz _array_descr.<locals>.<listcomp>is$���6�6�6�1�f�Q�i�1�$�&�6�6�6r�z|VzLdtype.descr is not defined for types with overlapping or out-of-order fieldsrr)r@�subdtype�metadata�str�copy�_array_descrr3r)r'r$�itemsize)�
descriptorrB�newr3�ordered_fields�result�offset�fieldr0r;�tupr@s           @rrFrFXs	���
�
�F�
�~��&�����"�*�!�~�%� �)�.�.�0�0���*�&�N�C�0�0�%�>�)� ��!��-�-�x��{�;�;���E�6�6�6�6��6�6�6�N�
�F�
�F�������8�f�����(�V�#�C��M�M�2�z�C�z�z�*�+�+�+��c�M�F�F�
�1�X��
�
��&�'�'�
'��u�:�:��>�>��!�H�e�A�h�'�D�D���8�D���8��	1���e�A�h�&7��&:�;�;���8�$�Q�'�)�C�C���e�A�h�/�/�0�C��%��(�#�#���
�
�c�������V�#�#��!�F�*���
�
�r�:��:�:�&�'�'�'��Mrc�.�tj|||��S�N)r�__new__)�subtype�shapers   r�_reconstructrT�s���?�7�E�5�1�1�1rzw(?P<order1>[<>|=]?)(?P<repeats> *[(]?[ ,0-9]*[)]? *)(?P<order2>[<>|=]?)(?P<dtype>[A-Za-z0-9.?]*(?:\[[a-zA-Z0-9,.]+\])?)z\s*,\s*z\s+$�=c���d}g}|t|��k�r�t�||���}	|���\}}}}n<#tt
f$r(t
dt|��dz�d|�d���d�wxYw|���}|t|��kr�t�||���rt|��}nVt�||���}|s$t
dt|��dz|fz���|���}|dkr|}n\|dkr|}nSt�||��}t�||��}||krt
d	|�d
|�����|}|ddtfvrd}||z}|dkr|}	n|tj|��f}	|�|	��|t|��k���|S)
Nr)�poszformat number rz of "z" is not recognizedz*format number %d of "%s" is not recognizedrAz&inconsistent byte-order specification z and �|rU)r$�	format_re�match�groups�	TypeError�AttributeErrorr'�end�space_re�sep_re�
_convorder�get�_nbo�ast�literal_evalr))
�astr�
startindexrK�mo�order1�repeats�order2r�order�newitems
          r�_commastringrn�s0���J�
�F�
�s�4�y�y�
 �
 �
�_�_�T�z�_�
2�
2��	�/1�y�y�{�{�,�V�W�f�e�e���>�*�	�	�	��N��V���Q��N�N�T�N�N�N����
�	�����V�V�X�X�
���D�	�	�!�!��~�~�d�
�~�3�3�
&� ��Y�Y�
�
��\�\�$�J�\�7�7���/�$�D��V���Q���-�.�/�/�/� �V�V�X�X�
��R�<�<��E�E�
�r�\�\��E�E��^�^�F�F�3�3�F��^�^�F�F�3�3�F��&� � � �j��V�V�V�V�%�&�&�&��E��S�#�t�$�$�$��E���
���r�M�M��G�G��c�.�w�7�7�8�G��
�
�g����S�s�4�y�y�
 �
 �V�Ms�A�9B	c�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�dummy_ctypec��||_dSrP��_cls)�self�clss  r�__init__zdummy_ctype.__init__�s
����	�	�	rc��|SrPr�rt�others  r�__mul__zdummy_ctype.__mul__�s���rc�,�|�|��SrPrrrxs  r�__call__zdummy_ctype.__call__�s���y�y����rc�"�|j|jkSrPrrrxs  r�__eq__zdummy_ctype.__eq__�����y�E�J�&�&rc�"�|j|jkSrPrrrxs  r�__ne__zdummy_ctype.__ne__�rrN)�__name__�
__module__�__qualname__rvrzr|r~r�rrrrprp�s_������������ � � �'�'�'�'�'�'�'�'rrpc�0�tj}|�|St�ddl}t	|j��}nYt
d��j}|dkr
tj}n2|dkr
tj	}n|dkr
tj
}ntj	}|t_|S)Nr�p�i�l�q)�_getintp_ctype�cache�ctypes�numpyrp�intpr�char�c_int�c_long�
c_longlong)�val�npr�s   rr�r��s���
�
�C�
���
�
�~������"�'�"�"����S�z�z����3�;�;��,�C�C�
�S�[�[��-�C�C�
�S�[�[��#�C�C��-�C��N���Jrc�.�eZdZd�ZGd�d��ZdS)�_missing_ctypesc��|jSrP��value)rtr0r.s   r�castz_missing_ctypes.cast�s
���y�rc��eZdZd�ZdS)�_missing_ctypes.c_void_pc��||_dSrPr�)rt�ptrs  rrvz!_missing_ctypes.c_void_p.__init__�s
���D�J�J�JrN)r�r�r�rvrrr�c_void_pr��s#������	�	�	�	�	rr�N)r�r�r�r�r�rrrr�r��sK������������������rr�c��eZdZdd�Zd�Zd�Zd�Zed���Zed���Z	ed���Z
ed	���Zd
�Zd�Z
d�Zd
�ZdS)�_ctypesNc�6�||_tr,t|_|j�|��|_n>t��|_|j�|��|_||j_|jjdkr	d|_dSd|_dS)NrTF)	�_arrr�r�r��_datar��_objects�ndim�_zerod)rtrr�s   rrvz_ctypes.__init__�s�����	��	(�!�D�L���.�.�s�3�3�D�J�J�+�,�,�D�L���.�.�s�3�3�D�J�"'�D�J���9�>�Q����D�K�K�K��D�K�K�Krc�^�|j�|j|��}|j|_|S)a�
        Return the data pointer cast to a particular c-types object.
        For example, calling ``self._as_parameter_`` is equivalent to
        ``self.data_as(ctypes.c_void_p)``. Perhaps you want to use the data as a
        pointer to a ctypes array of floating-point data:
        ``self.data_as(ctypes.POINTER(ctypes.c_double))``.

        The returned pointer will keep a reference to the array.
        )r�r�r�r�)rtr.r�s   r�data_asz_ctypes.data_ass+���l����
�C�0�0���9����
rc�L�|jrdS||jjz|jj�S)z�
        Return the shape tuple as an array of some other c-types
        type. For example: ``self.shape_as(ctypes.c_short)``.
        N)r�r�r�rS�rtr.s  r�shape_asz_ctypes.shape_ass-��
�;�	��4�"��D�I�N�"�T�Y�_�5�5rc�L�|jrdS||jjz|jj�S)z�
        Return the strides tuple as an array of some other
        c-types type. For example: ``self.strides_as(ctypes.c_longlong)``.
        N)r�r�r��stridesr�s  r�
strides_asz_ctypes.strides_as's.��
�;�	��4�"��D�I�N�"�T�Y�%6�7�7rc��|jjS)a
        A pointer to the memory area of the array as a Python integer.
        This memory area may contain data that is not aligned, or not in correct
        byte-order. The memory area may not even be writeable. The array
        flags and data-type of this array should be respected when passing this
        attribute to arbitrary C-code to avoid trouble that can include Python
        crashing. User Beware! The value of this attribute is exactly the same
        as ``self._array_interface_['data'][0]``.

        Note that unlike ``data_as``, a reference will not be kept to the array:
        code like ``ctypes.c_void_p((a + b).ctypes.data)`` will result in a
        pointer to a deallocated array, and should be spelt
        ``(a + b).ctypes.data_as(ctypes.c_void_p)``
        )r�r��rts r�dataz_ctypes.data0s�� �z��rc�D�|�t����S)a�
        (c_intp*self.ndim): A ctypes array of length self.ndim where
        the basetype is the C-integer corresponding to ``dtype('p')`` on this
        platform (see `~numpy.ctypeslib.c_intp`). This base-type could be
        `ctypes.c_int`, `ctypes.c_long`, or `ctypes.c_longlong` depending on
        the platform. The ctypes array contains the shape of
        the underlying array.
        )r�r�r�s rrSz
_ctypes.shapeBs���}�}�^�-�-�.�.�.rc�D�|�t����S)aj
        (c_intp*self.ndim): A ctypes array of length self.ndim where
        the basetype is the same as for the shape attribute. This ctypes array
        contains the strides information from the underlying array. This strides
        information is important for showing how many bytes must be jumped to
        get to the next element in the array.
        )r�r�r�s rr�z_ctypes.stridesNs�����~�/�/�0�0�0rc�@�|�tj��S)ze
        Overrides the ctypes semi-magic method

        Enables `c_func(some_array.ctypes)`
        )r�r�r�r�s r�_as_parameter_z_ctypes._as_parameter_Ys���|�|�F�O�,�,�,rc�H�tjdtd���|jS)zYDeprecated getter for the `_ctypes.data` property.

        .. deprecated:: 1.21
        z,"get_data" is deprecated. Use "data" insteadr��
stacklevel)�warnings�warn�DeprecationWarningr�r�s r�get_dataz_ctypes.get_datads-��
	�
�D�(�Q�	8�	8�	8�	8��y�rc�H�tjdtd���|jS)zZDeprecated getter for the `_ctypes.shape` property.

        .. deprecated:: 1.21
        z."get_shape" is deprecated. Use "shape" insteadrr�)r�r�r�rSr�s r�	get_shapez_ctypes.get_shapems-��
	�
�F�(�Q�	8�	8�	8�	8��z�rc�H�tjdtd���|jS)z\Deprecated getter for the `_ctypes.strides` property.

        .. deprecated:: 1.21
        z2"get_strides" is deprecated. Use "strides" insteadrr�)r�r�r�r�r�s r�get_stridesz_ctypes.get_stridesvs-��
	�
�J�(�Q�	8�	8�	8�	8��|�rc�H�tjdtd���|jS)zcDeprecated getter for the `_ctypes._as_parameter_` property.

        .. deprecated:: 1.21
        z>"get_as_parameter" is deprecated. Use "_as_parameter_" insteadrr�)r�r�r�r�r�s r�get_as_parameterz_ctypes.get_as_parameters0��
	�
�L��1�	
�	
�	
�	
��"�"rrP)r�r�r�rvr�r�r��propertyr�rSr�r�r�r�r�r�rrrr�r��s������� � � � �"���&6�6�6�8�8�8�� � ��X� �"�	/�	/��X�	/��1�1��X�1��-�-��X�-����������	#�	#�	#�	#�	#rr�c���|j}t|��}t|t��r|g}t	��}t|tt
f��r�|D]f}	|�|��n8#t$r+||vrtd|����d�td|����d�wxYw|�|���gtt|��|z��Std|�����)zf
    Given a datatype and an order object, return a new names tuple, with the
    order indicated
    zduplicate field name: Nzunknown field name: zunsupported order value: )	r3�listr%rD�setr&�remover'�add)�datatyperl�oldnames�	nameslist�seenr;s      r�	_newnamesr��s��
�~�H��X���I��%���������5�5�D��%�$���'�'�
.��	�	�D�
N�� � ��&�&�&�&���
N�
N�
N��4�<�<�$�%D�d�%D�%D�E�E�4�O�$�%B�D�%B�%B�C�C��M�	
N����

�H�H�T�N�N�N�N��T�%�[�[�9�,�-�-�-�
�8��8�8�
9�
9�9s�A4�45B)c�l��|j��j�fd��jD��d�}t||d���S)aReturn copy of structured array with padding between fields removed.

    Parameters
    ----------
    ary : ndarray
       Structured array from which to remove padding bytes

    Returns
    -------
    ary_copy : ndarray
       Copy of ary with padding bytes removed
    c�6��g|]}�j|d��Sr)r@)rr;�dts  �rrz _copy_fields.<locals>.<listcomp>�s$���F�F�F�T�b�i��o�a�0�F�F�Fr)r3r4T)rrE)rr3r)�ary�
copy_dtyper�s  @r�_copy_fieldsr��sM���

��B��8�F�F�F�F�R�X�F�F�F�H�H�J���J�T�2�2�2�2rc���|j�|j�|j|jkr td|j�d|j�d����||u}g}|jD]�}|j|}|j|}t|d|d��}|o	||du}|dd�|dd�krtd|�d����t	|��dkr|�||f����|�|d|f|f����t
||jp|j�	��}|rH|j|jkr8|jD].}|j|d
|j|d
kr|cS�/|S|S)a� Perform type promotion for two structured dtypes.

    Parameters
    ----------
    dt1 : structured dtype
        First dtype.
    dt2 : structured dtype
        Second dtype.

    Returns
    -------
    out : dtype
        The promoted dtype

    Notes
    -----
    If one of the inputs is aligned, the result will be.  The titles of
    both descriptors must match (point to the same field).
    Nz
field names `z` and `z` mismatch.rrzfield titles of field 'z
' mismatchrr)	r3rr@r	r$r)r�isalignedstructrG)	�dt1�dt2�	identical�
new_fieldsr;�field1�field2�	new_descrr<s	         r�_promote_fieldsr��s���*	�	��S�Y�.�3�9��	�3I�3I�!�H��	�H�H�#�)�H�H�H�J�J�	J��s�
�I��J��	�
>�
>����D�!����D�!��!�&��)�V�A�Y�7�7�	��8�)�v�a�y�"8�	��!�"�"�:������#�#�%�>�d�>�>�>�@�@�
@��v�;�;�!������t�Y�/�0�0�0�0�����q�	�4�0�)�<�=�=�=�=�
�
�#�"5�"L��9L�
M�
M�
M�C�
��S�\�S�\�1�1��I�	�	�D��z�$���"�c�j��&6�q�&9�9�9��
�
�
�:��
��Jrc���|js|jr_|dkr||krdS|j�;|jD]3}|j|d|kr|j|d|krdS�4td���dS)a Checks safety of getfield for object arrays.

    As in _view_is_safe, we need to check that memory containing objects is not
    reinterpreted as a non-object datatype and vice versa.

    Parameters
    ----------
    oldtype : data-type
        Data type of the original ndarray.
    newtype : data-type
        Data type of the field being accessed by ndarray.getfield
    offset : int
        Offset of the field being accessed by ndarray.getfield

    Raises
    ------
    TypeError
        If the field access is invalid

    rNrz'Cannot get/set field of an object array)�	hasobjectr3r@r\)�oldtype�newtyperLr;s    r�_getfield_is_safer��s���*��C�G�-�C��Q�;�;�7�g�-�-��F��=�$��
�
�
���N�4�(��+�v�5�5���t�,�Q�/�7�:�:��F�F���A�B�B�B�
�Frc�P�||krdS|js|jrtd���dS)az Checks safety of a view involving object arrays, for example when
    doing::

        np.zeros(10, dtype=oldtype).view(newtype)

    Parameters
    ----------
    oldtype : data-type
        Data type of original ndarray
    newtype : data-type
        Data type of the view

    Raises
    ------
    TypeError
        If the new type is incompatible with the old type.

    Nz)Cannot change data-type for object array.)r�r\)r�r�s  r�
_view_is_safer�
s?��,�'�������E�G�-�E��C�D�D�D�
�Fr�?�c�S1�b�B�h�Hr��Ir��Lr��Q�e�f�d�g�Zf�F�D�G�S�U�O�V)�Zd�Zg�s�wr�rrA�i2�u2�i4�u4�i8�u8�f2r�)r�r�r�rz
UCS-2 strings�pointers�	bitfieldszfunction pointers)�u�&�t�Xc�B�eZdZd�Zd�Zd�Zd�Zed���Zd�Z	dS)�_Streamc�"�||_d|_dS)N�@)r��	byteorder)rtr�s  rrvz_Stream.__init__is���������rc�L�|jd|�}|j|d�|_|SrP�r�)rtr/r<s   r�advancez_Stream.advancems'���f�R�a�R�j�����������
rc��|jdt|���|kr$|�t|����dSdS)NTF)r�r$r)rtr�s  r�consumez_Stream.consumers?���6�'�3�q�6�6�'�?�a����L�L��Q��� � � ��4��urc��t|��rxd}|t|j��krI||j|��s3|dz}|t|j��kr||j|���3|�|��S|j�|��}|�|��}|�t|����|S)Nrr)�callabler$r�r�index)rtr�r�r<s    r�
consume_untilz_Stream.consume_untilxs����A�;�;�		��A��c�$�&�k�k�/�/�!�!�D�F�1�I�,�,�/���E���c�$�&�k�k�/�/�!�!�D�F�1�I�,�,�/��<�<��?�?�"�����Q���A��,�,�q�/�/�C��L�L��Q��� � � ��Jrc��|jdS)Nrrr�s r�nextz_Stream.next�s���v�a�y�rc�*�t|j��SrP)�boolr�r�s r�__bool__z_Stream.__bool__�s���D�F�|�|�rN)
r�r�r�rvrrrr�rrrrrrrhsz������������
���
�
�
�����X������rrc�L�t|��}t|d���\}}|S)NF��is_subdtype)r�__dtype_from_pep3118)�spec�streamrrs    r�_dtype_from_pep3118r&�s(��
�T�]�]�F�'��E�B�B�B�L�E�5��Lrc�$�tgggd���}d}d}d}|�rgd}|�d��r�nNd}|�d��rJ|�d��}tt	t
|�d������}|jd	vr$|�d��}|d
krd}||_	|j	dvrt}	t}
nt}	t}
|�d
���}|rt|��}nd}d}|�d��rt|d���\}}
n�|j|
vr�|jdkr|�d��}n|�d��}|dk}|	|}|dvr
|d|zz
}d}ddd��|j	|j	��}t!||z��}|j}
n_|jt$vr:t$|j}t'd�|j|�����t+d|jz���d}|j	dkr]||
z}|j|
z}||z
}|dkr1|dks|�$t1|��dkrt3||��}n||z
}t5|
|��}|dkrt!||ff��}|�t!||f��}|�d��r|�d��}nd}|r|�p|�||dvrt7d|�d����|d�|��|d�|��|d�|��||jz
}||z
}||d <|��g|j	dkr|d xx||zz
cc<|ddgkr@|dddkr.|d |ddjkr|s|dd}nt;|��t!|��}||fS)!Nr�r3r4r5rGrF�}�(�)�,)rrUrr
�^�!r.r
)rr-c�,�|���SrP)�isdigit)r�s rrz&__dtype_from_pep3118.<locals>.<lambda>�s��!�)�)�+�+�o�rzT{Tr!�Zrr�USVz%drUz,Unrepresentable PEP 3118 data type {!r} ({})z'Unknown PEP 3118 data type specifier %rr�:r3zDuplicate field name 'z' in PEP3118 formatr4r5rG)�dictrrr&�mapr(�splitrrr�_pep3118_native_map�_pep3118_native_typechars�_pep3118_standard_map�_pep3118_standard_typecharsr#rbr�	alignment�_pep3118_unsupported_map�NotImplementedErrorr1r'r�rG�_prod�_add_trailing_padding�_lcm�RuntimeErrorr)�
_fix_names)r%r"�
field_specrL�common_alignment�
is_paddingr�rSr�type_map�type_map_chars�itemsize_strrGr�typechar�	dtypechar�numpy_byteorder�desc�extra_offset�
start_padding�
intra_paddingr;�rets                       rr#r#�s��������	���J��F����J��q(����>�>�#���	�����>�>�#���	6��(�(��-�-�E��#�c�5�;�;�s�#3�#3�4�4�5�5�E��;�8�8�8����q�)�)�I��C����	�(�F����z�)�)�*�H�6�N�N�,�H�8�N��+�+�,E�,E�F�F���	��<�(�(�H�H��H��
��>�>�$���	S�/��D�*�*�*�L�E�5�5�
�[�N�
*�
*��{�c�!�!�!�>�>�!�,�,���!�>�>�!�,�,��"�c�/�J� ��*�I��E�!�!��T�H�_�,�	���$'�c�2�2�6�6�� �&�"2�4�4�O��/�I�5�6�6�E��O�E�E�
�[�4�
4�
4�+�F�K�8�D�%�>�����T�*�*�,�,�
,��F���Q�R�R�R�����s�"�"�$�W��-�M�#�n�_��5�M��m�#�F���!�!��a�<�<�E�$5�%��,�,��:J�:J�1�%��G�G�E�E�!�M�1�L� $�E�+;�<�<���q�=�=��5�8�+�.�/�/�E����5�%�.�)�)�E��>�>�#���	��'�'��,�,�D�D��D��	1�t�|���D�J�w�,?�$?�$?�"�#U�D�#U�#U�#U�V�V�V��w��&�&�t�,�,�,��y�!�(�(��/�/�/��y�!�(�(��0�0�0��%�.� ���,���!'�
�:��c�q(�h��3����:����F�7�.>�">�>����	�7���v�%�%��9�%�a�(�A�-�-��:�&�*�Y�*?��*B�*K�K�K��L���#�A�&����:�����J����� � � rc�v�|d}t|��D] \}}|��d}	d|��}||vrn|dz}�|||<�!dS)z< Replace names which are None with the next unused f%d name r3NrTr�r)�	enumerate)rCr3r�r;�js     rrBrB!sx���w��E��U�#�#�
�
���4����
��	��q�7�7�D��5� � ���A��A�		�
��a���
�
rc���|j�tdg|gdg|j���}n>|j�|j}t|�fd�|D���fd�|D��|j���}|dxx|z
cc<t	|��S)zBInject the specified number of padding bytes at the end of a dtypeN�f0rr(c�,��g|]}�|d��Srr�rr;r@s  �rrz)_add_trailing_padding.<locals>.<listcomp>>�!���7�7�7��V�D�\�!�_�7�7�7rc�,��g|]}�|d��SrrrWs  �rrz)_add_trailing_padding.<locals>.<listcomp>?rXrrG)r@r4rGr3r)r��paddingrCr3r@s    @rr?r?0s�����|����&��G��C��^�	
�
�
�
�
���������7�7�7�7��7�7�7�7�7�7�7��7�7�7��^�	
�
�
�
��z����g�%��������rc��d}|D]}||z}�|S)Nrr)�ar�rs   rr>r>Fs&��	�A�
����	�Q�����Hrc��|r	|||z}}|�	|S)z0Calculate the greatest common divisor of a and br�r\r�s  r�_gcdr_Ls&��
���!�a�%�1�����Hrc�.�|t||��z|zSrP)r_r^s  rr@r@Rs����Q��
�
�?�Q��rc��d�d�|D��d�|���D��z��}||�dd��z}d�d�|D����}d�||||��S)�= Format the error message for when __array_ufunc__ gives up. �, c�8�g|]}d�|����S)z{!r}�r1�r�args  rrz0array_ufunc_errmsg_formatter.<locals>.<listcomp>Ws$��B�B�B�C�V�]�]�3�/�/�B�B�Brc�@�g|]\}}d�||����S)z{}={!r}re)r�k�vs   rrz0array_ufunc_errmsg_formatter.<locals>.<listcomp>Xs<��9�9�9�!%��A�'�-�-�a��3�3�9�9�9r�outrc3�XK�|]%}tt|��j��V��&dSrP)�repr�typer�rfs  r�	<genexpr>z/array_ufunc_errmsg_formatter.<locals>.<genexpr>[s3����F�F�#�T�$�s�)�)�"4�5�5�F�F�F�F�F�FrzToperand type(s) all returned NotImplemented from __array_ufunc__({!r}, {!r}, {}): {})�joinr#rbr1)�dummy�ufunc�method�inputs�kwargs�args_string�args�types_strings        r�array_ufunc_errmsg_formatterryUs����)�)�B�B�6�B�B�B�9�9�)/�����9�9�9�9�:�:�K��F�J�J�u�b�)�)�)�D��9�9�F�F��F�F�F�F�F�L�
2�
�V�E�6�;��
=�
=�?rc��d�|j|j��}d�|t|����S)rbz{}.{}zOno implementation found for '{}' on types that implement __array_function__: {})r1r�r�r�)�
public_api�types�	func_names   r�array_function_errmsg_formatterr~as;�����z�4�j�6I�J�J�I�
%�%+�V�I�t�E�{�{�%C�%C�Erc���|jdkrd}n1d�d�t|j��D����}|jdkrd}ni|jdkrd}n[d�d�d	�t|j��D����td
|jz�����}d}|j�d|�d�}n|dz
}d�|j|||���S)zz
    Builds a signature string which resembles PEP 457

    This is used to construct the first line of the docstring
    rrrcc3�&K�|]}d|dz��V��
dS)rrNr�rr�s  rroz1_ufunc_doc_signature_formatter.<locals>.<genexpr>ss,����@�@�!�I��!��I�I�@�@�@�@�@�@rrz, /, out=()z
, /, out=Nonez%[, {positional}], / [, out={default}]c3�FK�|]}d�|dz��V��dS)zout{}rNrer�s  rroz1_ufunc_doc_signature_formatter.<locals>.<genexpr>|sK����!@�!@�()����q��s�#�#�!@�!@�!@�!@�!@�!@rrP)�
positional�defaultz8, casting='same_kind', order='K', dtype=None, subok=TrueNz, where=Truez[, signature, extobj]z![, signature, extobj, axes, axis]z&{name}({in_args}{out_args}, *{kwargs}))r;�in_args�out_argsru)�ninrp�range�noutr1rm�	signaturer�)rrr�r�rus    r�_ufunc_doc_signature_formatterr�hs/��
�y�A�~�~�����)�)�@�@�u�U�Y�/?�/?�@�@�@�@�@��
�z�Q��� ���	��q���"���:�A�A��y�y�!@�!@�-2�5�:�->�->�!@�!@�!@�@�@�����+�,�,�B�
�
��	��
���=��=�=�=����5�5��4�:�:�
�^����	;���rc�|�	tr|jd}n
|jd}d|jvS#t$rYdSwxYw)N������r�F)�IS_PYPY�__mro__r��	Exception)ru�
ctype_bases  r�npy_ctypes_checkr��s[����	)���R��J�J���R��J��J�1�1�1�������u�u����s�*-�
;�;):�__doc__rd�re�sysr��
exceptionsr�
multiarrayrrrr	r��ImportError�implementationr;r�rrcr7r=rFrT�compilerYr`r_rarnrpr�r�r�r�r�r�r�r�r�r7rp�keysr8r9r:r<rr&r#rBr?r>r_r@ryr~r�r�rrr�<module>r�si�����
�
�
�	�	�	�	�
�
�
�
�����,�,�,�,�,�,�<�<�<�<�<�<�<�<�<�<�<�<���M�M�M�M������
�F�F�F������
�
!�V�
+���=�H����D�D��D�+�+�+�<,�,�,�@-�-�-�h2�2�2�
�B�J�K�
L�
L�	�
���J�	�	���2�:�g�����4�[�
�.�.�.�`
'�
'�
'�
'�
'�
'�
'�
'����&�����������O#�O#�O#�O#�O#�O#�O#�O#�d:�:�:�.3�3�3�$6�6�6�r���@���@������������	�
�����
���������������������������� ��!�"	�#�#�$�

�	�	�	�	�/����2�G�G�$7�$<�$<�$>�$>�?�?��������������	�
�����
���������������������������� 	�#�!�"	�#�#�$

�	�	�	�+����.!�g�g�&;�&@�&@�&B�&B�C�C��
�	�	�	�	���!�!�!�!�!�!�!�!�H���
N!�N!�N!�`
�
�
����,
�
�
�
�
�
����	?�	?�	?�E�E�E�-�-�-�`����s�+�5�5
Back to Directory File Manager