
    hn                        S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	J
r
Jr   SSKr\R                  R                  S:H  r\R"                  S:X  a  S	rOS
rS rS rS rS r\R.                  " S5      r\R.                  " S5      r\R.                  " S5      rS\0rS r " S S5      rS rS\l         " S S5      r  " S S5      r!S r"S r#S r$S r%S r&0 S S _S!S"_S#S#_S$S$_S%S%_S&S&_S'S'_S(S(_S)S)_S*S*_S+S+_S,S,_S-S-_S.S._S/S/_S0S0_S1S2_S3S4S5S6S7S8S9.Er'S:RQ                  \'RS                  5       5      r*0 S S _S!S"_S#S#_S$S$_S%S;_S&S<_S'S=_S(S>_S)S=_S*S>_S+S?_S,S@_S-SA_S.S._S/S/_S1S2_SBS3_S5S6S7S8SC.Er+S:RQ                  \+RS                  5       5      r,SDSESFSGSH.r- " SI SJ5      r.SK r/SL r0SM r1SN r2SO r3SP r4SQ r5SR r6SS r7ST r8SU r9g! \ a    Sr GNf = f)VzI
A place for internal code

Some things are more easily handled Python.

    N   )DTypePromotionError   )dtypearrayndarraypromote_typespypylittle<>c                 F   / nU R                  5        H  u  p4[        U5      n[        U[        5      (       a  US;  a  [	        S5      eUS:  a  US   U:X  a  MG  [        US   5      nUS:  a  [	        S5      e[        US   US9nUS:  a  US   nOS nUR                  X7Xh45        M     UR                  S S	9  U V	s/ s H  oS   PM	     n
n	U V	s/ s H  oS   PM	     nn	U V	s/ s H  oS   PM	     nn	U V	s/ s H  oS
   PM	     nn	XX4$ s  sn	f s  sn	f s  sn	f s  sn	f )N)r      zentry not a 2- or 3- tupler   r   r   zinvalid offset.alignc                     U S   $ )Nr    )xs    N/var/www/fran/franai/venv/lib/python3.13/site-packages/numpy/core/_internal.py<lambda>!_makenames_list.<locals>.<lambda>-   s    1    )keyr   )	itemslen
isinstancetuple
ValueErrorintr   appendsort)adictr   	allfieldsfnameobjnnumformattitler   namesformatsoffsetstitless                 r   _makenames_listr.      s.   Ikkm
H#u%%&9::q5SVu_#a&k7.//s1vU+q5FEE%45 $  NN~N&$%9aqT9E%&'YtYG'&'YtYG'%&IqdIF&7** &''&s   ?DD'D;Dc                 Z    U S   nUc  [        X5      u  p#pEOq/ n/ n/ nU He  nX   nUR                  US   5        UR                  US   5        [        U5      S:  a  UR                  US   5        MT  UR                  S 5        Mg     [	        UUUUS.U5      $ ! [          a    S n Nf = f)Nr   r   r   )r*   r+   r,   r-   )KeyErrorr.   r    r   r   )r"   r   r*   r+   r,   r-   nameress           r   
_usefieldsr4   8   s    b	 }*9%*G'D+CNN3q6"NN3q6"3x!|c!f%d#  5$$"$ &+, ,#  s   B B*)B*c                    U R                   nUcv  U R                  nUcT  U R                  c  U R                  $ U R                  R	                  5       nU(       a  U R                  U4$ U R                  $ [        US   5      US   4$ U R                  nU Vs/ s H  oQU   U4-   PM     nn/ nSnU H  n	U	S   U:  a#  U	S   U-
  n
UR                  SSU
 345        X-  nOU	S   U:  a  [        S5      e[        U	5      S:  a  U	S   U	S   4nOU	S   nU	S   R                  (       a/  U[        U	S   R                  S   5      U	S   R                  S   4nOU[        U	S   5      4nXS   R                  -  nUR                  U5        M     U R                  U:  a%  U R                  U-
  n
UR                  SSU
 345        U$ s  snf )Nr   r    z|VzLdtype.descr is not defined for types with overlapping or out-of-order fieldsr   r   )fieldssubdtypemetadatastrcopy_array_descrr*   r    r   r   itemsize)
descriptorr7   r8   newr*   r   ordered_fieldsresultoffsetfieldr'   r2   tups                r   r<   r<   X   s   F~&&""*!~~% ))..0&NNC00%>>) !-x{;;E0561Qi1$&N6FF8f(V#CMM2C5z*+MF1X&' ' u:>!HeAh'D8D8eAh&7&7&:;8$$Q')C eAh/0C(###c'  * V#!!F*rRu:&'M9 7s   Gc                 0    [         R                  " XU5      $ N)r   __new__)subtypeshaper   s      r   _reconstructrJ      s    ??7511r   zw(?P<order1>[<>|=]?)(?P<repeats> *[(]?[ ,0-9]*[)]? *)(?P<order2>[<>|=]?)(?P<dtype>[A-Za-z0-9.?]*(?:\[[a-zA-Z0-9,.]+\])?)z\s*,\s*z\s+$=c                 N   Sn/ nU[        U 5      :  Ga]  [        R                  XS9n UR                  5       u  pEpgUR                  5       nU[        U 5      :  aj  [        R                  XS9(       a  [        U 5      nOF[        R                  XS9nU(       d  [        S[        U5      S-   U 4-  5      eUR                  5       nUS:X  a  UnOMUS:X  a  UnOD[        R                  XD5      n[        R                  Xf5      nXF:w  a  [        S	U< S
U< 35      eUnUSS[        4;   a  SnX-   nUS:X  a  Un	OU[        R                  " U5      4n	UR                  U	5        U[        U 5      :  a  GM]  U$ ! [        [
        4 a     [        S[        U5      S-    SU  S35      S ef = f)Nr   )poszformat number r   z of "z" is not recognizedz*format number %d of "%s" is not recognizedr6   z&inconsistent byte-order specification z and |rK   )r   	format_rematchgroups	TypeErrorAttributeErrorr   endspace_resep_re
_convorderget_nboastliteral_evalr    )
astr
startindexrA   moorder1repeatsorder2r   ordernewitems
             r   _commastringrd      s   JF
s4y
 __T_2	/1yy{,Vf
 VVX
D	!~~d~3 Y
\\$\7$DVQ-./ /  VVX
R<Er\E^^F3F^^F3F  V%& & ES#t$$ErMGc..w78GgS s4y
 V MO >* 	 VQuTF:MN	s   E4 40F$c                   2    \ rS rSrS rS rS rS rS rSr	g)	dummy_ctype   c                     Xl         g rF   _cls)selfclss     r   __init__dummy_ctype.__init__   s    	r   c                     U $ rF   r   rk   others     r   __mul__dummy_ctype.__mul__   s    r   c                 $    U R                  U5      $ rF   ri   rp   s     r   __call__dummy_ctype.__call__   s    yyr   c                 4    U R                   UR                   :H  $ rF   ri   rp   s     r   __eq__dummy_ctype.__eq__       yyEJJ&&r   c                 4    U R                   UR                   :g  $ rF   ri   rp   s     r   __ne__dummy_ctype.__ne__   rz   r   ri   N)
__name__
__module____qualname____firstlineno__rm   rr   ru   rx   r|   __static_attributes__r   r   r   rf   rf      s     ''r   rf   c                  \   [         R                  n U b  U $ [        c  SS Kn[	        UR
                  5      n Oj[        S5      R                  nUS:X  a  [        R                  n O>US:X  a  [        R                  n O'US:X  a  [        R                  n O[        R                  n U [         l        U $ )Nr   pilq)_getintp_ctypecachectypesnumpyrf   intpr   charc_intc_long
c_longlong)valnpr   s      r   r   r      s    


C

~"''"Sz3;,,CS[--CS[##C--CNJr   c                   .    \ rS rSrS r " S S5      rSrg)_missing_ctypes   c                     UR                   $ rF   value)rk   r'   r%   s      r   cast_missing_ctypes.cast   s    yyr   c                       \ rS rSrS rSrg)_missing_ctypes.c_void_p   c                     Xl         g rF   r   )rk   ptrs     r   rm   !_missing_ctypes.c_void_p.__init__   s    Jr   r   N)r~   r   r   r   rm   r   r   r   r   c_void_pr      s    	r   r   r   N)r~   r   r   r   r   r   r   r   r   r   r   r      s     r   r   c                       \ rS rSrSS jrS rS rS r\S 5       r	\S 5       r
\S	 5       r\S
 5       rS rS rS rS rSrg)_ctypes   Nc                 N   Xl         [        (       a,  [        U l        U R                  R                  U5      U l        O?[        5       U l        U R                  R                  U5      U l        XR                  l        U R                   R                  S:X  a  SU l        g SU l        g )Nr   TF)	_arrr   r   r   _datar   _objectsndim_zerod)rk   r   r   s      r   rm   _ctypes.__init__   ss    	6!DL..s3DJ +,DL..s3DJ"'JJ99>>QDKDKr   c                 t    U R                   R                  U R                  U5      nU R                  Ul        U$ )ad  
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   )rk   r%   r   s      r   data_as_ctypes.data_as  s.     ll

C099
r   c                     U R                   (       a  gXR                  R                  -  " U R                  R                  6 $ )zp
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   rI   rk   r%   s     r   shape_as_ctypes.shape_as  s,    
 ;;IINN"TYY__55r   c                     U R                   (       a  gXR                  R                  -  " U R                  R                  6 $ )zw
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_as_ctypes.strides_as'  s.    
 ;;IINN"TYY%6%677r   c                 .    U R                   R                  $ )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   rk   s    r   data_ctypes.data0  s      zzr   c                 4    U R                  [        5       5      $ )aV  
(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    r   rI   _ctypes.shapeB  s     }}^-..r   c                 4    U R                  [        5       5      $ )a:  
(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    r   r   _ctypes.stridesN  s     ~/00r   c                 @    U R                  [        R                  5      $ )zM
Overrides the ctypes semi-magic method

Enables `c_func(some_array.ctypes)`
)r   r   r   r   s    r   _as_parameter__ctypes._as_parameter_Y  s     ||FOO,,r   c                 N    [         R                  " S[        SS9  U R                  $ )zIDeprecated 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_data_ctypes.get_datad  s"    
 	D(Q	8yyr   c                 N    [         R                  " S[        SS9  U R                  $ )zJDeprecated getter for the `_ctypes.shape` property.

.. deprecated:: 1.21
z."get_shape" is deprecated. Use "shape" insteadr   r   )r   r   r   rI   r   s    r   	get_shape_ctypes.get_shapem  s"    
 	F(Q	8zzr   c                 N    [         R                  " S[        SS9  U R                  $ )zLDeprecated getter for the `_ctypes.strides` property.

.. deprecated:: 1.21
z2"get_strides" is deprecated. Use "strides" insteadr   r   )r   r   r   r   r   s    r   get_strides_ctypes.get_stridesv  s"    
 	J(Q	8||r   c                 N    [         R                  " S[        SS9  U R                  $ )zSDeprecated getter for the `_ctypes._as_parameter_` property.

.. deprecated:: 1.21
z>"get_as_parameter" is deprecated. Use "_as_parameter_" insteadr   r   )r   r   r   r   r   s    r   get_as_parameter_ctypes.get_as_parameter  s&    
 	L1	
 """r   )r   r   r   r   rF   )r~   r   r   r   rm   r   r   r   propertyr   rI   r   r   r   r   r   r   r   r   r   r   r   r      sz     "&68    " 	/ 	/ 1 1 - -	#r   r   c                    U R                   n[        U5      n[        U[        5      (       a  U/n[	        5       n[        U[        [
        45      (       aC  U H&  n UR                  U5        UR                  U5        M(     [        [        U5      U-   5      $ [        SU 35      e! [         a$    XT;   a  [        SU 35      Se[        SU 35      Sef = f)zZ
Given a datatype and an order object, return a new names tuple, with the
order indicated
zduplicate field name: Nzunknown field name: zunsupported order value: )	r*   listr   r:   setr   remover   add)datatyperb   oldnames	nameslistseenr2   s         r   	_newnamesr     s    
 ~~HXI%5D%$''DN  & HHTN  T%[9,--
08
99  N<$'=dV%DE4O$';D6%BCM	Ns   B&&.Cc                     U R                   nUR                  UR                   Vs/ s H  o!R                  U   S   PM     snS.n[        XSS9$ s  snf )zReturn 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
r   )r*   r+   T)r   r;   )r   r*   r7   r   )arydtr2   
copy_dtypes       r   _copy_fieldsr     sP     
B88=?XXFXTiioa0XFHJT22 Gs   Ac                     U R                   b'  UR                   b  U R                   UR                   :w  a&  [        SU R                    SUR                    S35      eXL n/ nU R                    H  nU R                  U   nUR                  U   n[        US   US   5      nU=(       a    XuS   L nUSS USS :w  a  [        SU S35      e[	        U5      S:X  a  UR                  XG45        M  UR                  US   U4U45        M     [        X0R                  =(       d    UR                  S	9nU(       aY  UR                  U R                  :X  a?  U R                    H-  nU R                  U   S
   UR                  U   S
   :w  d  M+  Us  $    U $ U$ )aV  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.r   r   zfield titles of field 'z
' mismatchr   r   )	r*   r   r7   r	   r   r    r   isalignedstructr=   )	dt1dt2	identical
new_fieldsr2   field1field2	new_descrr3   s	            r   _promote_fieldsr     s   * 			SYY.399		3I!		{'#))KHJ 	J 
IJ		D!D!!&)VAY7	8)ay"8	 !":#%-dV:>@ @v;!t/0q	40)<=  
"5"5"L9L9L
MC
 S\\S\\1IIDzz$"cjj&6q&99
  
Jr   c                    UR                   (       d  U R                   (       ag  US:X  a  X:X  a  gU R                  bC  U R                   H3  nU R                  U   S   U:X  d  M  U R                  U   S   U:X  d  M3    g   [        S5      eg)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

r   Nr   z'Cannot get/set field of an object array)	hasobjectr*   r7   rR   )oldtypenewtyperB   r2   s       r   _getfield_is_safer     s|    * G--Q;7-==$NN4(+v5t,Q/7: & ABB
r   c                 j    X:X  a  gUR                   (       d  U R                   (       a  [        S5      eg)aE  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   rR   )r   r   s     r   _view_is_safer     s-    , G--CDD
r   ?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  r   r6   i2u2i4u4i8u8f2r
  )r  r  r  r   zUCS-2 stringspointers	bitfieldszfunction pointers)u&tXc                   B    \ rS rSrS rS rS rS r\S 5       r	S r
Srg	)
_Streamih  c                     Xl         SU l        g )N@)r  	byteorder)rk   r  s     r   rm   _Stream.__init__i  s    r   c                 L    U R                   S U nU R                   US  U l         U$ rF   r  )rk   r&   r3   s      r   advance_Stream.advancem  s'    ffRaj
r   c                 r    U R                   S [        U5       U:X  a  U R                  [        U5      5        gg)NTF)r  r   r#  )rk   r   s     r   consume_Stream.consumer  s.    66'3q6?aLLQ r   c                    [        U5      (       a  SnU[        U R                  5      :  aT  U" U R                  U   5      (       d:  US-   nU[        U R                  5      :  a  U" U R                  U   5      (       d  M:  U R                  U5      $ U R                  R	                  U5      nU R                  U5      nU R                  [        U5      5        U$ )Nr   r   )callabler   r  r#  index)rk   r   r   r3   s       r   consume_until_Stream.consume_untilx  s    A;;Ac$&&k/!DFF1I,,E c$&&k/!DFF1I,,<<?"QA,,q/CLLQ Jr   c                      U R                   S   $ )Nr   r"  r   s    r   next_Stream.next  s    vvayr   c                 ,    [        U R                  5      $ rF   )boolr  r   s    r   __bool___Stream.__bool__  s    DFF|r   )r  r  N)r~   r   r   r   rm   r#  r&  r+  r   r.  r2  r   r   r   r   r  r  h  s/    

  r   r  c                 4    [        U 5      n[        USS9u  p#U$ )NFis_subdtype)r  __dtype_from_pep3118)specstreamr   r   s       r   _dtype_from_pep3118r:    s    T]F'EBLELr   c                    [        / / / SS9nSnSnSnU (       GaJ  S nU R                  S5      (       a  GO0S nU R                  S5      (       a9  U R                  S5      n[        [	        [
        UR                  S5      5      5      nU R                  S	;   a  U R                  S5      nUS
:X  a  SnXl	        U R                  S;   a  [        n	[        n
O[        n	[        n
U R                  S 5      nU(       a  [        U5      nOSnSnU R                  S5      (       a  [        U SS9u  pmGOU R                  U
;   a  U R                  S:X  a  U R                  S5      nOU R                  S5      nUS:H  nX   nUS;   a
  USU-  -  nSnSSS.R                  U R                  U R                  5      n[!        UU-   5      nUR"                  nOdU R                  [$        ;   a8  [$        U R                     n['        SR)                  U R                  U5      5      e[+        SU R,                  -  5      eSnU R                  S:X  aV  U* U-  nUR.                  * U-  nUU-  nUS:w  a*  US:  d  Ub  [1        U5      S:  a  [3        UU5      nOUU-  n[5        X5      nUS:w  a  [!        Xl445      nUb  [!        Xg45      nU R                  S5      (       a  U R                  S5      nOS nU(       a  UbW  Ub  UUS   ;   a  [7        SU S35      eUS   R9                  U5        US   R9                  U5        US   R9                  U5        X6R.                  -  nUU-  nX2S '   U (       a  GMJ  U R                  S:X  a  US ==   U* U-  -  ss'   US   S /:X  a8  US   S   S:X  a,  US    US   S   R.                  :X  a  U(       d  US   S   nUU4$ [;        U5        [!        U5      nUU4$ )!Nr   r*   r+   r,   r=   r   F}(),)r  rK   r   r   ^!rB  r   )r  rA  c                 ,    U R                  5       (       + $ rF   )isdigit)r   s    r   r   &__dtype_from_pep3118.<locals>.<lambda>  s    !))+or   zT{Tr5  Zr   r   USVz%drK   z,Unrepresentable PEP 3118 data type {!r} ({})z'Unknown PEP 3118 data type specifier %rr  :r*   zDuplicate field name 'z' in PEP3118 formatr+   r,   r=   )dictr&  r+  r   mapr   splitr.  r#  r  _pep3118_native_map_pep3118_native_typechars_pep3118_standard_map_pep3118_standard_typecharsr7  rX   r   	alignment_pep3118_unsupported_mapNotImplementedErrorr(   r   r  r=   _prod_add_trailing_padding_lcmRuntimeErrorr    
_fix_names)r9  r6  
field_specrB   common_alignment
is_paddingr   rI   r  type_maptype_map_charsitemsize_strr=   r   typechar	dtypecharnumpy_byteorderdescextra_offsetstart_paddingintra_paddingr2   rets                          r   r7  r7    s$   	J FJ  >># >>#((-E#c5;;s#345E ;;88q)IC	( z)*H6N,H8N ++,EF<(HH 
>>$/D*LE5[[N*{{c!!>>!,!>>!,"c/J *IE!TH_,	$'c266  &"2"24O/I56EOOE[[44+FKK8D%>T*, , FQRR s"$W-M#nn_5Mm#F!a<E$5%,:J1%GE !M1L  $E< q=5+./E 5.)E >>#'',DDt|DJw,?$?"%;D6AT#UVVw&&t,y!((/y!((0.. ,!':c &h 3:F7.>">> 	7v%9%a(A-:&*Y*?*B*K*KK#A&    	 	:J    r   c                 r    U S   n[        U5       H#  u  p#Ub  M
  Sn SU 3nX1;  a  OUS-   nM  X1U'   M%     g)z;Replace names which are None with the next unused f%d name r*   Nr   r   r   )	enumerate)rX  r*   r   r2   js        r   rW  rW  !  sY    wEU#qc7D AA	 
 a $r   c           	      H   U R                   c  [        S/U /S/U R                  S9nOZU R                   nU R                  n[        UU Vs/ s H
  oSU   S   PM     snU Vs/ s H
  oSU   S   PM     snU R                  S9nUS==   U-  ss'   [	        U5      $ s  snf s  snf )zBInject the specified number of padding bytes at the end of a dtypef0r   r<  r   r=   )r7   rI  r=   r*   r   )r   paddingrX  r7   r*   r2   s         r   rT  rT  0  s    ||&GC^^	

 167D\!_7167D\!_7^^	

 zg% 87s   
B
!Bc                 $    SnU  H  nX-  nM	     U$ )Nr   r   )ar   r   s      r   rS  rS  F  s    	A	 Hr   c                 0    U(       a  XU-  pU(       a  M  U $ )z0Calculate the greatest common divisor of a and br   rm  r   s     r   _gcdrp  L  s    
a%1 !Hr   c                 $    U [        X5      -  U-  $ rF   )rp  ro  s     r   rU  rU  R  s    Q
?Qr   c                 `   SR                  U Vs/ s H  nSR                  U5      PM     snUR                  5        VVs/ s H  u  pgSR                  Xg5      PM     snn-   5      nX4R                  SS5      -   n	SR                  S U	 5       5      n
SR                  XX5      $ s  snf s  snnf )<Format the error message for when __array_ufunc__ gives up. , z{!r}z{}={!r}outr   c              3   ^   #    U  H#  n[        [        U5      R                  5      v   M%     g 7frF   )reprtyper~   ).0args     r   	<genexpr>/array_ufunc_errmsg_formatter.<locals>.<genexpr>[  s"     F#T$s)"4"455s   +-zToperand type(s) all returned NotImplemented from __array_ufunc__({!r}, {!r}, {}): {})joinr(   r   rX   )dummyufuncmethodinputskwargsrz  kvargs_stringargstypes_strings              r   array_ufunc_errmsg_formatterr  U  s    ))6B6CV]]3/6B)/9)7 '--a3)799 :K JJub))D99FFFL2VE;=? C9s   B% B*c                     SR                  U R                  U R                  5      nSR                  U[        U5      5      $ )rs  z{}.{}zOno implementation found for '{}' on types that implement __array_function__: {})r(   r   r~   r   )
public_apitypes	func_names      r   array_function_errmsg_formatterr  a  s9    z44j6I6IJI%%+VItE{%CEr   c                    U R                   S:X  a  SnO+SR                  S [        U R                   5       5       5      nU R                  S:X  a  SnObU R                  S:X  a  SnOOSR	                  SR                  S	 [        U R                  5       5       5      [        S
U R                  -  5      S9nSnU R                  c  SU S3nOUS-  nSR	                  U R                  UUUS9$ )zn
Builds a signature string which resembles PEP 457

This is used to construct the first line of the docstring
r   r   rt  c              3   2   #    U  H  nS US-    3v   M     g7f)r   r   Nr   ry  r   s     r   r{  1_ufunc_doc_signature_formatter.<locals>.<genexpr>s  s     @/?!a!uI/?s   r   z, /, out=()z, /, out=Nonez%[, {positional}], / [, out={default}]c              3   J   #    U  H  nS R                  US-   5      v   M     g7f)zout{}r   N)r(   r  s     r   r{  r  |  s%      !@->qs##->s   !#rF   )
positionaldefaultz8, casting='same_kind', order='K', dtype=None, subok=Truez, where=Truez[, signature, extobj]z![, signature, extobj, axes, axis]z&{name}({in_args}{out_args}, *{kwargs}))r2   in_argsout_argsr  )ninr}  rangenoutr(   rw  	signaturer~   )r  r  r  r  s       r   _ufunc_doc_signature_formatterr  h  s     yyA~))@uUYY/?@@ zzQ 	q":AAyy !@-25::->!@ @+, B 
	  x'<=55 4::^^	 ;  r   c                      [         (       a  U R                  S   nOU R                  S   nSUR                  ;   $ ! [         a     gf = f)Nr   F)IS_PYPY__mro__r   	Exception)rl   
ctype_bases     r   npy_ctypes_checkr    sM     7RJ RJJ1111 s   8; 
AA):__doc__rZ   resysr   
exceptionsr   
multiarrayr   r   r   r	   r   ImportErrorimplementationr2   r  r  rY   r.   r4   r<   rJ   compilerO   rV   rU   rW   rd   rf   r   r   r   r   r   r   r   r   r   rL  r}  keysrM  rN  rO  rQ  r  r:  r7  rW  rT  rS  rp  rU  r  r  r  r  r   r   r   <module>r     st    	 
  , < < 


!
!V
+==HDD+<,@-h2 JJ K L	 
J	::g 4[
.`
' 
'&   O# O#d:.3$6r@@  	
             !" 	##$ 
				/ 2 GG$7$<$<$>?   	
             	#!" 	##$ 
			+ . !gg&;&@&@&BC  
				 ! !H
N!`,	?E-`Q  Fs   G GG