+
    :i{`             	       &   R t ^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIt	^ RI
HtHt ^ RIHtHtHt ^ RIHtHtHtHtHtHtHtHt ^ RIHtHtHtHt ^ RIH t H!t!H"t"H#t# ^ RI$H%t% ^ R	IH&t& ^ R
I'H(t(H)t)H*t*H+t+H,t,H-t- ^ RI.H/t/ R t0]0! 4       t1]&R 4       t2]&R 4       t3]! ]	Ph                  ]Pj                  4      ]! R]Pj                  4      R 4       4       t6]R 4       t7R t8]! ]	Ph                  ]Pj                  ]Pr                  ]Pt                  4      ]! ]	Ph                  ]Pj                  ]Pv                  ]Pt                  4      ]! R]Pj                  ]Pr                  ]Pt                  4      ]! R]Pj                  ]Pv                  ]Pt                  4      R 4       4       4       4       t<]! ]	Ph                  ]Pj                  ]Pt                  4      ]! R]Pj                  ]Pt                  4      R 4       4       t=]! ]	Ph                  ]Pj                  ]Pr                  4      ]! ]	Ph                  ]Pj                  ]Pv                  4      ]! R]Pj                  ]Pr                  4      ]! R]Pj                  ]Pv                  4      R 4       4       4       4       t>R t?]! ]	P                  4      ]! ]Pj                  R4      R 4       4       tA]! ]	P                  4      ]! ]Pj                  R4      R 4       4       tC]! ]	P                  4      ]! ]Pj                  R4      R 4       4       tE]! ]	P                  4      ]! ]Pj                  R4      R 4       4       tG]! ]	P                  4      ]! ]Pj                  R4      R  4       4       tI]! ]	P                  4      ]! ]Pj                  R!4      R" 4       4       tK]R# 4       tL]R$ 4       tM]R% 4       tN]! ]	P                  4      ]! ]	P                  4      ]! ]Pj                  R&4      R' 4       4       4       tQ]! ]	P                  4      ]! ]	P                  4      ]! ]Pj                  R(4      R) 4       4       4       tT]R* 4       tU]R+ 4       tV]R, 4       tW]! ]	P                  4      ]! ]Pj                  R-4      ERR. l4       4       tY]R/ 4       tZ]R0 4       t[]R1 4       t\R2 t]]! ]	P                  4      ]! ]Pj                  R34      ERR4 l4       4       t_]! ]	P                  4      ]! ]Pj                  R54      R6 4       4       ta]ERR8 l4       tb]! ]	P                  4      ]! ]Pj                  R94      ERR: l4       4       td]! ]	P                  4      ]! ]Pj                  R;4      R< 4       4       tf]! ]	P                  4      ERR= l4       thR> ti]! ]	P                  4      R? 4       tk]! ]	P                  4      R@ 4       tm]! ]	P                  4      RA 4       tn]! ]	P                  4      RB 4       to]! ]	P                  4      RC 4       tqRD tr]! ]	P                  4      ERRE l4       ts]! ]	P                  4      ERRF l4       tt]RG 4       tu]RH 4       tv]RI 4       twRJ tx]! ]x! ]uR7RK7      4      ty]! ]x! ]vR7RK7      4      tz]! ]x! ]uRLRK7      4      t{]! ]x! ]vRLRK7      4      t|]RM 4       t}]! ]	P                  4      ERRN l4       t~]! ]	P                  4      RO 4       t]! ]	EP                  4      RP 4       t]! ]	EP                  4      RQ 4       t]! ]	EP
                  4      RR 4       t]! ]	EP                  4      RS 4       t]! ]	EP                  4      RT 4       t]! ]	EP                  4      RU 4       t]! ]	EP                  4      RV 4       t]! ]	EP                  4      RW 4       t]RX 4       tRY tRZ tR[ t]! ]4      R\ 4       t]! ]4      R] 4       tR^ t]! ]4      R_ 4       t]! ]	EP2                  4      R` 4       t]ER8  d   ]! ]Pj                  Ra4      ! ]4       ]Rb 4       tERRc lt]! ]! ]u4      4      t]! ]! ]4      4      t]! ]! ]RLRd7      4      tRe t]! ]! ]4      4      t]! ]! ]4      4      t]! ]! ]4      4      t]Rf 4       t]Rg 4       t]! ]	EPL                  4      Rh 4       t]Ri 4       t]Rj 4       t]Rk 4       t]Rl 4       t]Rm 4       t]Rn 4       tRo t]! ]	EP^                  4      Rp 4       t]! ]	EPb                  4      Rq 4       t]! ]	EPf                  4      Rr 4       t]! ]	EPj                  4      Rs 4       t]! ]	EPn                  4      Rt 4       t]Ru 4       t]Rv 4       t]Rw 4       t]! ]	EPx                  4      Rx 4       t]! ]	EP|                  4      Ry 4       t]Rz 4       t]! ]	EP                  4      ERR{ l4       t]R| 4       t]ER	R} l4       t]! ]	EP                  4      ER	R~ l4       t]! ]	EP                  4      ER
R l4       t]! ]	EP                  4      ER	R l4       t]ER	R l4       t]! ]	EP                  4      ER	R l4       t]! ]	EP                  4      ER
R l4       t]! ]	EP                  4      ER	R l4       tR t]! ]4      R 4       tR t]! ]	EP                  4      ERR l4       tR t]! ]4      R 4       tR t]! ]4      R 4       tERR lt]ER8  d   ]! ]	EP                  4      ERR l4       t]ER8  d   ]! ]	EP                  4      ERR l4       t]R 4       t]R 4       t]! ]	EP                  4      ERR l4       t]! ]	EP                  4      R 4       t^t]R 4       t]R 4       t]R 4       t]! ]	EP                  4      R 4       t]R 4       t]R 4       tR t]! ]4      R 4       t]R 4       t]! R 4      tR tR t]R 4       t]! R 4      t]R 4       tR t]R 4       t]R 4       t]! ]	EP                  4      ERR l4       t]! ]	EP                  4      ERR l4       t]! ]	EP                  4      R 4       t]! ]	EP                   4      R 4       Et]R 4       Et]R 4       Et]R 4       Et]R 4       Et]R 4       Et]! R 4      EtR Et]! E]4      R 4       Et	]! ]	EP                  4      ERR l4       EtR Et]&R 4       Et]R 4       Et]! ]	EP                  4      ]! ]	EP                   4      ER
R l4       4       Et]ER8  d   ]! ]	EP$                  4      ! E]4       ]! ]	EP&                  4      R 4       Et]! ]	EP*                  4      ERR l4       Et]! ]	EP.                  ]Pj                  4      ]! R]Pj                  4      R 4       4       EtR Et]R 4       Et]R 4       EtR Et]! ]	EP:                  4      R 4       Et]! ]	EP:                  4      R 4       Et]! ]	EP@                  4      R 4       Et!]! ]	EPD                  4      R 4       Et#]! ]EPH                  4      R 4       Et%]! ]	EPL                  4      ERR l4       Et']! R 4      Et(]! R 4      Et)]! ]	EPT                  4      R 4       Et+]! ]	EPX                  4      ERR l4       Et-]! ]	EP\                  4      R 4       Et/]! ]	EP`                  4      ERR l4       Et1R Et2]! ]	EPf                  4      ERR l4       Et4]! ]4      Et5]! ]4      Et6]R 4       Et7]R 4       Et8]R 4       Et9]R 4       Et:]R 4       Et;R Et<E]=! RR04      Et>R Et?]! ]	EP                  4      ERR l4       Et@]! ]	EP                  4      ERR l4       EtBE]CEtD]! ]	EP                  4      ERR l4       EtFEREtG]! RE]G4      EtHEREtI]! RE]I4      EtJEREtK]! RE]K4      EtLR EtME]M! 4        R EtN]! ]	EP                  4      R 4       EtO]! ]	EP                  4      R 4       EtPR EtQR EtRR EtS]! E]S4      R 4       EtT]! ]	EP                  4      ERR l4       EtV]! ]	EP                  4      ERR l4       EtX]! ]	EP                  4      ERR l4       EtZ]ER8  d)   ]! ]	EP                  4      ]	EP                  3R l4       Et]]! ]	EP                  4      R 4       Et_]! ]	EP                  4      ER	R l4       Eta]! ]	EP                  4      R 4       Etc]! ]	EP                  4      ERR l4       Ete]! ]	EP                  4      ERR l4       Etg]R 4       Eth]R 4       Eti]R 4       Etj]R 4       EtkR Etl]! ]	EP                  4      ! E]l! E]h4      4       ]! ]	EP                  4      ! E]l! E]i4      4       ]! ]	EP                  4      ! E]l! E]j4      4       ]! ]	EP                  4      ! E]l! E]k4      4       ]	EP                  ! . ERO4      Etr]	EP                  ! . ERO4      Ets]R 4       Ett]R 4       Etu]R 4       Etv]! ]	EP                  4      R 4       Etx]R 4       EtyR Etz]! E]z4      R 4       Et{]! ]	EP                  4      R 4       Et}]R 4       Et~R Et]! E]4      R 4       Et]! ]	EP                  4      ERR l4       Et]! ]	EP                  4      ERR l4       Et]ERR l4       Et]! ]	EP                  4      ERER  l4       EtERER lEt]ER8  d   ]! ]	EP                  4      ! E]4       ]! ]	EP                  4      ERER l4       EtR# (  z5
Implementation of math operations on Array objects.
N)
namedtuple)typescgutils)overloadoverload_methodregister_jitable)as_dtypetype_can_asarraytype_is_scalarnumpy_versionis_nonelikecheck_is_integer	lt_floats
lt_complex)lower_builtinimpl_ret_borrowedimpl_ret_new_refimpl_ret_untracked)
make_array	load_item
store_item_empty_nd_impl)ensure_blas)	intrinsic)RequireLiteralValueTypingErrorNumbaValueErrorNumbaNotImplementedErrorNumbaTypeErrorNumbaDeprecationWarning)tuple_setitemc                  @     \        4        R#   \         d     R # i ; iFT)r   ImportError     P/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/np/arraymath.py_check_blasr'       s%       s   
 c                   aaa \        V4      ^,
          o\        P                  ! \        P                  S4      oS! SV4      pVVV3R lpW43# )z
This routine converts shape list where the axis dimension has already
been popped to a tuple for indexing of the same size.  The original shape
tuple is also required because it contains a length field at compile time
whereas the shape list does not.
c           	      Z  < V P                  S4      p\        P                  ! V4      pVw  rgR  p\        S4       Fl  p	V P	                  \
        P                  V	4      p
V P                  W\
        P                  ! S\
        P                  4      Wj.4      pVP                  W[V	4      pKn  	  V# )c                     W,          # Nr$   )ais   &&r&   array_indexerB_create_tuple_result_shape.<locals>.codegen.<locals>.array_indexerE   s	    4Kr%   )	get_value_typer   get_null_valuerangeget_constantr   intpcompile_internalinsert_value)cgctxbuilder	signatureargslltuptytupin_shape_r.   r-   dataidxdatand
shape_listtuptys   &&&&        r&   codegen+_create_tuple_result_shape.<locals>.codegen=   s    &&u-$$W- 	 rA((Q7G))'*/**Z*L+3*=?D &&s!4C  
r%   )lenr   UniTupler4   )tyctxrB   shape_tuplefunction_sigrD   rA   rC   s   &f&  @@r&   _create_tuple_result_shaperK   ,   sD     
[	A	BNN5::r*E[1L*   r%   c                  a	a
a \        V\        P                  4      '       g   \        R4      hVP                  o	\        V4      o
S	S
8  d   ^ o	S	pS
V,
          ^,
          p. pV\        P                  .V,          ,          pV\        P                  .,          pV\        P                  .V,          ,          p\        P                  ! V4      oS! WV4      pV	V
V3R lpWx3# )a0  
Generates a tuple that can be used to index a specific slice from an
array for sum with axis.  shape_tuple is the size of the dimensions of
the input array.  'value' is the value to put in the indexing tuple
in the axis dimension and 'axis' is that dimension.  For this to work,
axis has to be a const.
z axis argument must be a constantc                 x  < V P                  S4      p\        P                  ! V4      pVw  rgpR  pV P                  W\        P
                  ! 4       . 4      p	\        ^ S4       F  p
VP                  WYV
4      pK  	  VP                  WWS4      p\        S^,           S4       F  p
VP                  WYV
4      pK  	  V# )c                      \        R R 4      # r+   )slicer$   r%   r&   create_full_slice<_gen_index_tuple.<locals>.codegen.<locals>.create_full_slice   s    t$$r%   )r0   r   r1   r5   r   slice2_typer2   r6   )r7   r8   r9   r:   r;   r<   r>   	value_argrP   
slice_datar-   
axis_valuerA   rC   s   &&&&       r&   rD   !_gen_index_tuple.<locals>.codegen|   s    &&u-$$W- !q	% ++G,1,=,=,?,.0
 q*%A&&s:C & ""3:> zA~r*A&&s:C +
r%   )	
isinstancer   Literalr   literal_valuerF   rR   r4   Tuple)rH   rI   valueaxisbeforeafter
types_listrJ   rD   rU   rA   rC   s   &&&&     @@@r&   _gen_index_tupler`   U   s     dEMM**!"DEE##J	[	B R
 FK!OEJ5$$%..J5::,J5$$%--J KK
#ET2L>   r%   z	array.sumc           
         a VP                  ^ 4      oV3R lpV P                  WW#\        VP                   R7      R7      p\        WVP                   V4      # )    c                 r   < Sp\         P                  ! V 4       F  pWP                  4       ,          pK  	  V# r+   npnditeritem)arrcvzeros   &  r&   array_sum_impl!array_sum.<locals>.array_sum_impl   ,    3AMA  r%   ri   localsreturn_typer5   dictr   contextr8   sigr:   rl   resrk   s   &&&&  @r&   	array_sumry      S     ??1D 
"
"7C*.*A # CCWsDDr%   c                     V # r+   r$   )rh   rj   s   &&r&   _array_sum_axis_nopr|      s    Jr%   c                     a aaa VV VV3R  lpV# )c                V  < V P                   pS'       g   V^ 8  g   V^8  d   \        R4      hW8  d   \        R4      h\        V P                  4      pW1,          pVP	                  V4       \        W0P                  4      p\        P                  ! VS\        S4      4      p\        V4       F  pS'       d)   \        V P                  VS4      pW`V,          ,          pK3  V^ 8X  d)   \        V P                  V^ 4      p	W`V	,          ,          pKb  V^8X  d)   \        V P                  V^4      p
W`V
,          ,          pK  V^8X  d)   \        V P                  V^4      pW`V,          ,          pK  V^8X  g   K  \        V P                  V^4      pW`V,          ,          pK  	  S! V^ 4      # )a  
function that performs sums over one specific axis

The third parameter to gen_index_tuple that generates the indexing
tuples has to be a const so we can't just pass "axis" through since
that isn't const.  We can check for specific values and have
different instances that do take consts.  Supporting axis summation
only up to the fourth dimension for now.

typing/arraydecl.py:sum_expand defines the return type for sum with
axis. It is one dimension less than the input array.
zHNumba does not support sum with axis parameter outside the range 0 to 3.zaxis is out of bounds for array)ndim
ValueErrorlistshapepoprK   re   fulltyper2   r`   )rh   r\   r   ashapeaxis_lenashape_without_axisresult
axis_indexindex_tuple_genericindex_tuple1index_tuple2index_tuple3index_tuple4const_axis_valis_axis_constoprk   s   &&           r&   inner gen_sum_axis_impl.<locals>.inner   sn    xxax4!8  "G H H
 <>?? cii<

48K,dDJ?  /J&6syy*7E'G#122
 19#3CIIz1#ML,//FQY#3CIIz1#ML,//FQY#3CIIz1#ML,//FQY#3CIIz1#ML,//F+ *, &!}r%   r$   )r   r   r   rk   r   s   ffff r&   gen_sum_axis_implr      s    < <z Lr%   c                   a VP                   p\        VR V4      ! ^ 4      p\        VRR4      f   \        P                  pM\        pVP
                  w  rxp	Rp
^ p\        V\        P                  4      '       d   VP                  pV^ 8  d   VP                  V,           pV^ 8  g   WP                  8  d   \        R4      hV P                  P                  V4      pV P                  W4      pV^ ,          W^,          3pVP                  WxV	.R7      pRp
\!        WWe4      p\#        V4      oV3R lpV P%                  WW#4      p\'        WVP                   V4      # )dtyper   NFz'axis' entry is out of boundsr:   Tc                    < S! W4      # r+   r$   )rh   r\   r   compileds   &&&r&   array_sum_impl_axis1array_sum_axis_dtype.<locals>.array_sum_impl_axis      ""r%   )rs   getattrre   taker|   r:   rW   r   rX   rY   r   r   typing_contextresolve_value_typer3   replacer   r   r5   r   )rv   r8   rw   r:   rettyrk   r   ty_arrayty_axisty_dtyper   r   axis_valgen_implr   rx   r   s   &&&&            @r&   array_sum_axis_dtyper      s;   
 OOE5'5)!,D ufd#+WW $'HH!XMN'5==)) ..A%]]^;NA--!?<==((;;NK''@Awq')kk8<k= IH)H# 
"
"7
KCGcoosCCr%   c           
         a VP                  ^ 4      oV3R lpV P                  WW#\        VP                   R7      R7      p\        WVP                   V4      # )rb   c                 r   < Sp\         P                  ! V 4       F  pW#P                  4       ,          pK  	  V# r+   rd   )rh   r   ri   rj   rk   s   &&  r&   rl   'array_sum_dtype.<locals>.array_sum_impl'  rn   r%   ro   rp   rr   ru   s   &&&&  @r&   array_sum_dtyper   "  rz   r%   c                   a VP                   p\        VR V4      ! ^ 4      p\        VRR4      f   \        P                  pM\        pVP
                  w  rxRp	^ p
\        V\        P                  4      '       d   VP                  p
V
^ 8  d   VP                  V
,           p
V
^ 8  g   WP                  8  d   RV
 R2p\        V4      hV P                  P                  V
4      pV P                  W4      pV^ ,          V3pVP                  Wx.R7      pRp	\!        WWe4      p\#        V4      oV3R lpV P%                  WW#4      p\'        WVP                   V4      # )	r   r   NFz'axis' entry (z) is out of boundsr   Tc                    < S! W4      # r+   r$   )rh   r\   r   s   &&r&   r   +array_sum_axis.<locals>.array_sum_impl_axisW  r   r%   )rs   r   re   r   r|   r:   rW   r   rX   rY   r   r   r   r   r3   r   r   r   r5   r   )rv   r8   rw   r:   r   rk   r   r   r   r   r   msgr   r   r   rx   r   s   &&&&            @r&   array_sum_axisr   2  sB   
 OOE5'5)!,D ufd#+WW ((XMN'5==)) ..A%]]^;NA--!?">"22DEC!#&&((;;NK''@Aw kk2k3 IH)H# 
"
"7
KCGcoosCCr%   c                     V P                   \        P                  8X  d(   \        P                  ! V4      P	                  V 4      pV# V P                  V4      pV# r+   )r   re   timedelta64int64view)r   r[   acc_inits   && r&   get_accumulatorr   ^  sF    zzR^^#88E?''. O ::e$Or%   prodc                 >  a \        V \        P                  4      '       d*   \        V P                  4      p\        V^4      oV3R lpV# \        V \        P                  \        P                  34      '       d#   \        V 4      P                  ^4      oV3R lpV# R# )   c                 r   < Sp\         P                  ! V 4       F  pWP                  4       ,          pK  	  V# r+   rd   r,   ri   rj   r   s   &  r&   array_prod_impl#array_prod.<locals>.array_prod_impln  s,    AYYq\VVX "Hr%   c                    < SV ,          # r+   r$   )r,   r   s   &r&   scalar_prod_impl$array_prod.<locals>.scalar_prod_implx  s    a<r%   N)	rW   r   Arrayr   r   r   NumberBooleanr   )r,   r   r   r   r   s   &   @r&   
array_prodr   f  s}     !U[[!!!"5!,	 	Aemm4	5	5A;##A&	    
6r%   cumsumc                   aa \        V \        P                  4      '       d   V P                  \        P                  9   pV P                  \        P
                  8H  pV'       d4   V P                  P                  \        P                  P                  8  g	   V'       d   \        \        P                  4      oM\        V P                  4      o\        S^ 4      oVV3R lpV# R# )rb   c                    < \         P                  ! V P                  S4      pSp\        V P                  4       F  w  r4W$,          pW!V&   K  	  V# r+   re   emptysize	enumerateflatr,   outri   idxrj   r   r   s   &    r&   array_cumsum_impl'array_cumsum.<locals>.array_cumsum_impl  F    ((1665)CA#AFF+C , Jr%   N
rW   r   r   r   signed_domainbool_bitwidthr4   r   r   )r,   
is_integeris_boolr   r   r   s   &   @@r&   array_cumsumr   ~  s     !U[[!!WW 3 33
''U[[(177++ejj.A.AAUZZ(EQWW%E"5!,	 ! ' "r%   cumprodc                   aa \        V \        P                  4      '       d   V P                  \        P                  9   pV P                  \        P
                  8H  pV'       d4   V P                  P                  \        P                  P                  8  g	   V'       d   \        \        P                  4      oM\        V P                  4      o\        S^4      oVV3R lpV# R# )r   c                    < \         P                  ! V P                  S4      pSp\        V P                  4       F  w  r4W$,          pW!V&   K  	  V# r+   r   r   s   &    r&   array_cumprod_impl)array_cumprod.<locals>.array_cumprod_impl  r   r%   Nr   )r,   r   r   r   r   r   s   &   @@r&   array_cumprodr     s     !U[[!!WW 3 33
''U[[(177++ejj.A.AAUZZ(EQWW%E"5!,	 "!' "r%   meanc                 f  aa \        V \        P                  \        P                  34      '       d   R  pV# \        V \        P                  \        P
                  34      '       d#   \        V 4      P                  ^ 4      oV3R lpV# \        V \        P                  4      '       d   V P                  \        P                  \        \        P                  .4      ,          9   pV'       d   \        \        P                  4      pM\        V P                  4      p\        V^ 4      oV3R lpV# R# )c                 <    \         P                  ! V 4      R ,           #         )re   float64r,   s   &r&   _scalar_mean array_mean.<locals>._scalar_mean  s    ::a=3&&r%   c                    < V S,           # r+   r$   )r,   
typed_zeros   &r&   r   r     s    z>!r%   c                    < Sp\         P                  ! V 4       F  pWP                  4       ,          pK  	  WP                  ,          # r+   )re   rf   rg   r   r   s   &  r&   array_mean_impl#array_mean.<locals>.array_mean_impl  s5     AYYq\VVX "vv:r%   N)rW   r   Integerr   FloatComplexr   r   r   r   integer_domain	frozensetr   r   r   )r,   r   	is_numberr   r   r   r   s   &    @@r&   
array_meanr     s     !emmU]]344	'	AU]]3	4	4a[%%a(
	"	Au{{	#	#GGu33i6NNN	U]]+EQWW%E"5!,	 r%   varc                 P    \        V \        P                  4      '       d   R  pV# R# )c                 "   V P                  4       p^ p\        P                  ! V 4       FR  pVP                  4       V,
          pV\        P                  ! V\        P
                  ! V4      ,          4      ,          pKT  	  W P                  ,          # rb   )r   re   rf   rg   realconjr   )r,   mssdrj   vals   &    r&   array_var_impl!array_var.<locals>.array_var_impl  sc    A CYYq\vvx!|rwwsRWWS\122 " <r%   NrW   r   r   )r,   r   s   & r&   	array_varr    s'     !U[[!!		   "r%   stdc                 P    \        V \        P                  4      '       d   R  pV# R# )c                 0    V P                  4       R ,          #       ?)r   r   s   &r&   array_std_impl!array_std.<locals>.array_std_impl  s    557c>!r%   Nr  )r,   r	  s   & r&   	array_stdr    s'     !U[[!!	" 	 "r%   c                 
    W8  # r+   r$   r,   min_vals   &&r&   min_comparatorr    
    ;r%   c                 
    W8  # r+   r$   r  s   &&r&   max_comparatorr    r  r%   c                     R # Fr$   r   s   &r&   return_falser    s    r%   minc                   aa \        V \        P                  \        P                  34      '       d   R  pV# \        V \        P                  4      '       g   R# \        V P
                  \        P                  \        P                  34      '       d   \        P                  o\        oM\        V P
                  \        P                  4      '       d   \        oR p\        V4      oMM\        V P
                  \        P                  4      '       d   \        P                  o\        oM\        o\        oVV3R lpV# )c                     V # r+   r$   r   s   &r&   
scalar_minnpy_min.<locals>.scalar_min      Hr%   Nc                     V P                   VP                   8  d   R # V P                   VP                   8X  d   V P                  VP                  8  d   R # R# TFr   imagr  s   &&r&   	comp_funcnpy_min.<locals>.comp_func  ;    vv$7<<'66GLL(r%   c                 :  < V P                   ^ 8X  d   \        R4      h\        P                  ! V 4      p\	        V4      P                  ^ 4      pS! V4      '       d   V# V F7  pVP                  4       pS! V4      '       d   Vu # S! WB4      '       g   K5  TpK9  	  V# )rb   zDzero-size array to reduction operation minimum which has no identityr   r   re   rf   nextr   rg   )r,   it	min_valuer   rj   
comparatorpre_return_funcs   &    r&   impl_minnpy_min.<locals>.impl_min!      66Q; = > > YYq\HMM!$	9%%D		Aq!!!''	  r%   )rW   r   r   r   r   r   
NPDatetimeNPTimedeltare   isnatr  r   r  r   r   isnan)r,   r  r   r*  r(  r)  s   &   @@r&   npy_minr1        
 !ell5==122	a%%!''E,,e.?.?@AA((#
	AGGU]]	+	+&	 &i0
	AGGU[[	)	)((#
&#
$ Or%   maxc                   aa \        V \        P                  \        P                  34      '       d   R  pV# \        V \        P                  4      '       g   R# \        V P
                  \        P                  \        P                  34      '       d   \        P                  o\        oM\        V P
                  \        P                  4      '       d   \        oR p\        V4      oMM\        V P
                  \        P                  4      '       d   \        P                  o\        oM\        o\        oVV3R lpV# )c                     V # r+   r$   r   s   &r&   
scalar_maxnpy_max.<locals>.scalar_max<  r  r%   Nc                     V P                   VP                   8  d   R # V P                   VP                   8X  d   V P                  VP                  8  d   R # R# r  r  )r,   max_vals   &&r&   r   npy_max.<locals>.comp_funcI  r"  r%   c                 :  < V P                   ^ 8X  d   \        R4      h\        P                  ! V 4      p\	        V4      P                  ^ 4      pS! V4      '       d   V# V F7  pVP                  4       pS! V4      '       d   Vu # S! WB4      '       g   K5  TpK9  	  V# )rb   zDzero-size array to reduction operation maximum which has no identityr$  )r,   r&  	max_valuer   rj   r(  r)  s   &    r&   impl_maxnpy_max.<locals>.impl_maxY  r,  r%   )rW   r   r   r   r   r   r-  r.  re   r/  r  r   r  r   r   r0  )r,   r6  r   r=  r(  r)  s   &   @@r&   npy_maxr?  6  r2  r%   c                 z   V P                   ^ 8X  d   \        R4      h\        P                  ! V 4      p\	        V4      P                  ^ 4      p^ p\        P                  ! V4      '       d   V# ^pV FF  pVP                  4       p\        P                  ! V4      '       d   Vu # Wb8  d   TpTpV^,          pKH  	  V# rb   *attempt to get argmin of an empty sequencer   r   re   rf   r%  r   r/  rg   )arryr&  r'  min_idxr   r   rj   s   &      r&   array_argmin_impl_datetimerF  n      yyA~EFF	4BRa IG	xx	
CIIK88A;;J=IGq  Nr%   c                 8   V P                   ^ 8X  d   \        R4      hV P                   F  pTp^ p M	  \        P                  ! X4      '       d   X# ^ pV P                   F6  p\        P                  ! V4      '       d   Vu # W8  d   TpTpV^,          pK8  	  X# rA  r   r   r   re   r0  rD  rj   r'  rE  r   s   &    r&   array_argmin_impl_floatrK        yyA~EFFYY	  
xx	
CYY88A;;J=IGq  Nr%   c                     V P                   ^ 8X  d   \        R4      hV P                   F  pTp^ p M	  \        R4      h^ pV P                   F  pW8  d   TpTpV^,          pK  	  V# )rb   rB  unreachable)r   r   r   RuntimeErrorrJ  s   &    r&   array_argmin_impl_genericrP    ss    yyA~EFFYY	 
 =))
CYY=IGq	 
 Nr%   argminc                 F  a \        V P                  \        P                  \        P                  34      '       d   \
        oM7\        V P                  \        P                  4      '       d   \        oM\        o\        V4      '       d   RV3R llpV# \        WS4      pV# )Nc                    < S! V 4      # r+   r$   r,   r\   flatten_impls   &&r&   array_argmin_impl'array_argmin.<locals>.array_argmin_impl      ?"r%   r+   )rW   r   r   r-  r.  rF  r   rK  rP  r   %build_argmax_or_argmin_with_axis_impl)r,   r\   rV  rU  s   && @r&   array_argminrZ    ~     !''E,,e.?.?@AA1	AGGU[[	)	).04	#  B\
 r%   c                 z   V P                   ^ 8X  d   \        R4      h\        P                  ! V 4      p\	        V4      P                  ^ 4      p^ p\        P                  ! V4      '       d   V# ^pV FF  pVP                  4       p\        P                  ! V4      '       d   Vu # Wb8  d   TpTpV^,          pKH  	  V# rb   z*attempt to get argmax of an empty sequencerC  )rD  r&  r<  max_idxr   r   rj   s   &      r&   array_argmax_impl_datetimer_    rG  r%   c                 8   V P                   ^ 8X  d   \        R4      hV P                   F  pTp^ p M	  \        P                  ! X4      '       d   X# ^ pV P                   F6  p\        P                  ! V4      '       d   Vu # W8  d   TpTpV^,          pK8  	  X# r]  rI  rD  rj   r<  r^  r   s   &    r&   array_argmax_impl_floatrb    rL  r%   c                     V P                   ^ 8X  d   \        R4      hV P                   F  pTp^ p M	  ^ pV P                   F  pVX8  d   TpTpV^,          pK  	  X# r]  )r   r   r   ra  s   &    r&   array_argmax_impl_genericrd    sj    yyA~EFFYY	 
 CYYy=IGq	 
 Nr%   c                   aaa \        VR4       \        P                  o\        \	        V P
                  4      4      oRVVV3R llpV# )zp
Given a function that implements the logic for handling a flattened
array, return the implementation function.
r\   c                 4  < V^ 8  d   V P                   V,           pV^ 8  g   WP                   8  d   \        R4      hV P                   ^8X  d	   S	! V 4      # Sp\        WP                   ^,
          4       F  p\        W#V^,           4      pK  	  \        W P                   ^,
          V4      pV P	                  V4      pVP
                  R,          pVP                  4       pVP                  V P                  8X  g   Q hVP                  V,          ^ 8X  g   Q h\        P                  ! VP                  V,          S
4      p\        VP                  4       F$  pS	! WsV,          V^,           V,           4      W&   K&  	  VP                  VP
                  RR 4      # )rb   zaxis is out of boundsN)r   r   r2   r    	transposer   ravelr   re   r   reshape)r,   r\   tmpr-   transpose_indextransposed_arrr   raveledr   rU  r   tuple_buffers   &&       r&   impl3build_argmax_or_argmin_with_axis_impl.<locals>.impl
  sP   !866D=D!8tvv~455 66Q;?" tVVaZ(AA.C )'VVaZ>_5   $ &&(||qvv%%%""Q&!+++hh~**a/7sxxA!'a%Q!"<=CF ! {{>//455r%   r+   )r   r   r4   tupler2   r   )r,   r\   rU  rp  r   ro  s   &&f @@r&   rY  rY     s;    
 T6"JJEqvv'L6 6> Kr%   argmaxc                 F  a \        V P                  \        P                  \        P                  34      '       d   \
        oM7\        V P                  \        P                  4      '       d   \        oM\        o\        V4      '       d   RV3R llpV# \        WS4      pV# )Nc                    < S! V 4      # r+   r$   rT  s   &&r&   array_argmax_impl'array_argmax.<locals>.array_argmax_impl7  rX  r%   r+   )rW   r   r   r-  r.  r_  r   rb  rd  r   rY  )r,   r\   rv  rU  s   && @r&   array_argmaxrx  ,  r[  r%   allc                     \        V \        P                  \        P                  34      '       d   R  pV# \        V \        P                  4      '       d   R pV# R# )c                     \        V 4      # r+   boolr   s   &r&   
scalar_allnp_all.<locals>.scalar_allF      7Nr%   c                 r    \         P                  ! V 4       F  pVP                  4       '       d   K   R # 	  R# r"   rd   r,   rj   s   & r&   flat_allnp_all.<locals>.flat_allL  s'    YYq\vvxx  " r%   NrW   r   r   r   r   )r,   r~  r  s   &  r&   np_allr  @  sK    
 !ellEMM233	 !U[[!!	
 r%   Fc                    \         P                  ! V 4      p\         P                  ! V4      pV'       g	   V'       g   V'       d   V'       g   R # V'       d   V'       d   V'       g   R #  R# \         P                  ! V 4      '       g   \         P                  ! V4      '       d   W8H  # \         P                  ! W,
          4      W2\         P                  ! VR,          4      ,          ,           8  d   R # R# )F      ?Tre   r0  isinfabs)a_vb_vrtolatol	equal_nan	a_v_isnan	b_v_isnans   &&&&&  r&   _allclose_scalarsr  V  s    II Iy Y   88C==BHHSMM:66#)tRVVC#I->&>>>r%   allclosec                    \        V 4      '       g   \        R 4      h\        V4      '       g   \        R4      h\        V\        \        P
                  34      '       g   \        R4      h\        V\        \        P
                  34      '       g   \        R4      h\        V\        \        P                  34      '       g   \        R4      h\        V \        P                  4      p\        V\        P                  4      pV'       d   V'       d   R
R lpV# V'       d   V'       g   R
R lpV# V'       g   V'       d   R
R lp	V	# V'       g   V'       g   R
R lp
V
# R	# R	# ))The first argument "a" must be array-like*The second argument "b" must be array-like2The third argument "rtol" must be a floating point3The fourth argument "atol" must be a floating point0The fifth argument "equal_nan" must be a booleanc                     \        WW#VR 7      # )r  r  r  )r  r,   br  r  r  s   &&&&&r&   np_allclose_impl_scalar_scalar3np_allclose.<locals>.np_allclose_impl_scalar_scalar  s    $Q/8: :r%   c           	          \         P                  ! V4      p\         P                  ! V4       F(  p\        WP	                  4       W#VR 7      '       d   K'   R# 	  R# r  FTre   asarrayrf   r  rg   )r,   r  r  r  r  bvs   &&&&& r&   np_allclose_impl_scalar_array2np_allclose.<locals>.np_allclose_impl_scalar_array  sC    

1Aiil(GGID3<> >  # r%   c           	          \         P                  ! V 4      p \         P                  ! V 4       F)  p\        VP	                  4       WVVR 7      '       d   K(   R# 	  R# r  r  )r,   r  r  r  r  avs   &&&&& r&   np_allclose_impl_array_scalar2np_allclose.<locals>.np_allclose_impl_array_scalar  sE    

1Aiil(At3<> >  # r%   c           	      6   \         P                  ! V 4      p \         P                  ! V4      p\         P                  ! W4      w  rV\         P                  ! WV34       F9  w  rx\	        VP                  4       VP                  4       VW4R 7      '       d   K8   R# 	  R# r  )re   r  broadcast_arraysrf   r  rg   )	r,   r  r  r  r  a_ab_br  r  s	   &&&&&    r&   np_allclose_impl_array_array1np_allclose.<locals>.np_allclose_impl_array_array  sq    

1A

1A**10HC))SJ/(BGGID.2I I  0
 r%   Ngh㈵>g:0yE>F)	r	   r   rW   floatr   r   r}  r   r   )r,   r  r  r  r  is_a_scalaris_b_scalarr  r  r  r  s   &&&&&      r&   np_allcloser  p  s    AEFFAFGGdUEKK011 + , 	, dUEKK011 + , 	, i$!677 $ % 	% Q-KQ-K{	: .-	[	 -,[	 -,	 ,+ "-[r%   anyc                     \        V \        P                  \        P                  34      '       d   R  pV# \        V \        P                  4      '       d   R pV# R# )c                     \        V 4      # r+   r|  r   s   &r&   
scalar_anynp_any.<locals>.scalar_any  r  r%   c                 r    \         P                  ! V 4       F  pVP                  4       '       g   K   R # 	  R# r  rd   r  s   & r&   flat_anynp_any.<locals>.flat_any  s'    YYq\6688 " r%   Nr  )r,   r  r  s   &  r&   np_anyr    sK     !ellEMM233	 !U[[!!	
 r%   c                     Ve(   \        V\        P                  4      '       g   RR lpV# Ve!   \        V\        P                  4      '       d   RR lpV# RR lpV# )Nc                     \        R 4      h)z)Numba does not support average with axis.)	TypeError)r,   r\   weightss   &&&r&   np_average_impl#np_average.<locals>.np_average_impl  s    GHHr%   c                 Z    \         P                  ! V 4      p\         P                  ! V4      # r+   )re   r  r   )r,   r\   r  rh   s   &&& r&   r  r    s    jjmwws|#r%   c                 ~   \         P                  ! V 4      p\         P                  ! V4      pVP                  VP                  8w  d   VP                  ^8w  d   \	        R4      h\         P
                  ! V4      pVR8X  d   \        R4      h\         P
                  ! \         P                  ! W24      4      V,          pV# )r   z81D weights expected when shapes of a and weights differ.r   z)Weights sum to zero, can't be normalized.)re   r  r   r   r  sumZeroDivisionErrormultiply)r,   r\   r  rh   sclavgs   &&&   r&   r  r    s    jjm**W-99-||q('45 5 ffWo#:+CE E ffR[[67#=
r%   NN)rW   r   NoneType)r,   r\   r  r  s   &&& r&   
np_averager    sW    
4 @ @	I4 / ?j%..AA$, %$ r%   c                    \        V \        P                  \        P                  34      '       d   \        P
                  # \        R 4       pV# )z
A generic isnan() function
c                     R # r  r$   xs   &r&   _trivial_isnan!get_isnan.<locals>._trivial_isnan  s    r%   )rW   r   r   r   re   r0  r   )r   r  s   & r&   	get_isnanr    s?     %%++u}}566xx		 
	r%   c                 .    \        V 4      '       d   R  # R# )c                 H    \         P                  ! V 4      P                  ^ 8g  # r   re   r  r  r  s   &r&   <lambda>np_iscomplex.<locals>.<lambda>      A++q0r%   Nr	   r  s   &r&   np_iscomplexr        00r%   c                 .    \        V 4      '       d   R  # R# )c                 H    \         P                  ! V 4      P                  ^ 8H  # r   r  r  s   &r&   r  np_isreal.<locals>.<lambda>  r  r%   Nr  r  s   &r&   	np_isrealr    r  r%   c                 .  a \        V 4      p\        V \        P                  4      '       d   \        V P                  4      p\
        P                  ! V\
        P                  4      o\        V \        P                  4      '       d	   V3R  lpV# V3R lpV# )c                    < V f   R# S# NFr$   r  iscmplxs   &r&   rp  iscomplexobj.<locals>.impl  s    yNr%   c                    < S# r+   r$   r  s   &r&   rp  r    s    Nr%   )determine_dtyperW   r   Optionalr   re   
issubdtypecomplexfloating)r  dtrp  r  s   &  @r&   iscomplexobjr    sk     
	B!U^^$$QVV$mmB 2 23G!U^^$$	 K	Kr%   c                     R  pV# )c                 8    \         P                  ! V 4      '       * # r+   )re   r  r  s   &r&   rp  isrealobj.<locals>.impl  s    ??1%%%r%   r$   r  rp  s   & r&   	isrealobjr    s    
&Kr%   c                 *   a \        V 4      oV3R  lpV# )c                    < S# r+   r$   )elementrx   s   &r&   rp  np_isscalar.<locals>.impl(  s    
r%   )r
   )r  rp  rx   s   & @r&   np_isscalarr  $  s    

!CKr%   c                 N   a \        V4      '       d   RV3R llpV# RV3R llpV# )Nc                    < \         P                  ! \         P                  ! V 4      S! \         P                  ! V 4      4      4      # r+   re   logical_andr  signbitr  r   fns   &&r&   rp  is_np_inf_impl.<locals>.impl1  s)    >>"((1+r"**Q-/@AAr%   c                    < \         P                  ! \         P                  ! V 4      S! \         P                  ! V 4      4      V4      # r+   r  r   s   &&r&   rp  r  4  s+    >>"((1+r"**Q-/@#FFr%   r+   r   )r  r   r  rp  s   &&f r&   is_np_inf_implr  -  s*     3	B K	G Kr%   c                 2    \        R  4      p\        WV4      # )c                     V # r+   r$   r  s   &r&   r  isneginf.<locals>.<lambda><  s    Ar%   r   r  r   s   && r&   isneginfr
  :  s    	+	&B!"%%r%   c                 2    \        R  4      p\        WV4      # )c                     V ( # r+   r$   r  s   &r&   r  isposinf.<locals>.<lambda>B  s    QBr%   r	  r   s   && r&   isposinfr  @  s    	,	'B!"%%r%   c                 
    W8  # r+   r$   r,   r  s   &&r&   	less_thanr  F  	    5Lr%   c                 
    W8  # r+   r$   r  s   &&r&   greater_thanr  K  r  r%   c                 >    V P                   ^ 8X  d   \        R4      hR# )rb   z3zero-size array to reduction operation not possibleN)r   r   r   s   &r&   check_arrayr  P  s    vv{NOO r%   c                 4   a  V'       d	   V 3R  lpV# V 3R lpV# )c                 R  < \         P                  ! V 4      p\        V4       \         P                  ! V4      p\	        V4      P                  ^ 4      pV F  pVP                  4       p\         P                  ! VP                  4      '       d+   \         P                  ! VP                  4      '       g   TpKc  S! VP                  VP                  4      '       d   TpK  VP                  VP                  8X  g   K  S! VP                  VP                  4      '       g   K  TpK  	  V# r   )
re   r  r  rf   r%  r   rg   r0  r   r  r,   rh   r&  
return_valr   rj   comparison_ops   &     r&   rp  !nan_min_max_factory.<locals>.implX  s    **Q-C3Bbq)JIIK88JOO,,RXXaff5E5E!"J$QVVZ__==%&
:??2(AA)*J  r%   c                 <  < \         P                  ! V 4      p\        V4       \         P                  ! V4      p\	        V4      P                  ^ 4      pV FC  pVP                  4       p\         P                  ! V4      '       d   K1  S! W54      '       d   KA  TpKE  	  V# r   )re   r  r  rf   r%  r   rg   r0  r  s   &     r&   rp  r  i  sq    **Q-C3Bbq)JIIKxx{{(77%&
	 
 r%   r$   )r  is_complex_dtyperp  s   f& r&   nan_min_max_factoryr  V  s    	: K
	 Kr%   )r  Tc                    \         P                  ! V 4      '       d   \         P                  ! V4      '       d   V# \         P                  ! V 4      '       d(   \         P                  ! V4      '       d   V ^ 8  V^ 8  8H  # \         P                  ! V 4      '       g   \         P                  ! V4      '       d   R# \        W,
          4      W2\        V4      ,          ,           8*  # )rb   Fr  )r  yr  r  r  s   &&&&&r&   _isclose_itemr"    s    	xx{{rxx{{	!!A1q5!!	!15zT3q6M111r%   c                 P   \        V 4      '       g   \        R 4      h\        V4      '       g   \        R4      h\        V\        \        P
                  34      '       g   \        R4      h\        V\        \        P
                  34      '       g   \        R4      h\        V\        \        P                  34      '       g   \        R4      h\        V \        P                  4      '       d(   \        V\        P                  4      '       d   R	R lpV# \        V \        P                  4      '       d(   \        V\        P                  4      '       d   R	R lpV# \        V \        P                  4      '       d(   \        V\        P                  4      '       d   R	R lpV# R	R lpV# )
r  r  r  r  r  c                    V P                  R4      pTp\        P                  ! \        V4      \        P                  4      p\        \        V4      4       F  p\        WX,          WbW44      Wx&   K  	  VP                  V P                  4      # r   rg  rj  re   zerosrF   r   r2   r"  r   	r,   r  r  r  r  r  r!  r   r-   s	   &&&&&    r&   isclose_implisclose.<locals>.isclose_impl  sc    		"AA((3q6288,C3s8_&qtQdF %;;qww''r%   c                    T pVP                  R4      p\        P                  ! \        V4      \        P                  4      p\        \        V4      4       F  p\        WVV,          W#V4      Wx&   K  	  VP                  VP                  4      # r%  r&  r(  s	   &&&&&    r&   r)  r*    se    A		"A((3q6288,C3s8_&qA$IF %;;qww''r%   c                    \         P                  ! V P                  VP                  4      p\         P                  ! W4      p\         P                  ! W4      p\         P                  ! \        V4      \         P                  R 7      p\        \         P                  ! Wg34      4       F4  w  p	w  r\        V
P                  4       VP                  4       W#V4      W&   K6  	  \         P                  ! W4      # r   )re   broadcast_shapesr   broadcast_tor'  rF   r   r   rf   r"  rg   )r,   r  r  r  r  r   a_b_r   r-   r  r  s   &&&&&       r&   r)  r*    s    ''9E*B*B((3r7"((3C(B8)<=8B&rwwy"'')T'02  > ??3..r%   c                     \        WW#V4      # r+   )r"  r  s   &&&&&r&   r)  r*    s     t9==r%   r  )
r	   r   rW   r  r   r   r}  r   r   r   )r,   r  r  r  r  r)  s   &&&&& r&   iscloser4    sJ   AEFFAFGGdUEKK011 + , 	, dUEKK011 + , 	, i$!677 $ % 	% !U[[!!jELL&A&A	(B 3 
Au||	$	$Au{{)C)C	(0 ! 
Au{{	#	#
1ekk(B(B		/ 	> r%   c                     \        V 4      p\        P                  ! V\        P                  4      '       d   \        # \
        # r+   )r  re   r  r  complex_nanminreal_nanminr,   r  s   & r&   	np_nanminr9    /    		B	}}R++,,r%   c                     \        V 4      p\        P                  ! V\        P                  4      '       d   \        # \
        # r+   )r  re   r  r  complex_nanmaxreal_nanmaxr8  s   & r&   	np_nanmaxr>    r:  r%   c                    a \        V \        P                  4      '       g   R # \        V P                  4      oV3R lpV# )Nc                    < R p^ p\         P                  ! V 4       FB  pVP                  4       pS! V4      '       d   K#  WP                  4       ,          pV^,          pKD  	  \         P                  ! W4      # r   )re   rf   rg   divide)r,   ri   countr   rj   r0  s   &    r&   nanmean_impl np_nanmean.<locals>.nanmean_impl  sZ    IIaLD		A88VVX
	 ! yy""r%   rW   r   r   r  r   )r,   rC  r0  s   & @r&   
np_nanmeanrF    s2    a%%aggE	# r%   c                    a \        V \        P                  4      '       g   R # \        V P                  4      oV3R lpV# )Nc                   < \         P                  ! V 4      pR p^ p\         P                  ! V 4       F{  pVP                  4       pS! V4      '       d   K#  VP                  4       V,
          pV\         P                  ! V\         P
                  ! V4      ,          4      ,          pV^,          pK}  	  \         P                  ! W#4      # r   )re   nanmeanrf   rg   r   r   rA  )r,   r   r   rB  r   rj   r   r0  s   &      r&   nanvar_implnp_nanvar.<locals>.nanvar_impl  s    JJqM IIaLD		A88vvx!|rwwsRWWS\122
 ! yy$$r%   rE  )r,   rJ  r0  s   & @r&   	np_nanvarrL    s2    a%%aggE%  r%   c                 P    \        V \        P                  4      '       g   R # R pV# )Nc                 <    \         P                  ! V 4      R ,          # r  )re   nanvarr   s   &r&   nanstd_implnp_nanstd.<locals>.nanstd_impl  s    yy|s""r%   r  )r,   rP  s   & r&   	np_nanstdrR  
  s#    a%%# r%   c                 $  aa \        V \        P                  4      '       g   R # \        V P                  \        P                  4      '       d   \        P
                  pMV P                  pV! ^ 4      o\        V P                  4      oVV3R lpV# )Nc                    < Sp\         P                  ! V 4       F+  pVP                  4       pS! V4      '       d   K#  W,          pK-  	  V# r+   rd   )r,   ri   r   rj   r0  rk   s   &   r&   nansum_implnp_nansum.<locals>.nansum_impl   s<    IIaLD		A88 ! r%   rW   r   r   r   r   r4   r  )r,   r   rU  r0  rk   s   &  @@r&   	np_nansumrX    sb    a%%!''5==))

8DaggE r%   c                 $  aa \        V \        P                  4      '       g   R # \        V P                  \        P                  4      '       d   \        P
                  pMV P                  pV! ^4      o\        V P                  4      oVV3R lpV# )Nc                    < Sp\         P                  ! V 4       F+  pVP                  4       pS! V4      '       d   K#  W,          pK-  	  V# r+   rd   )r,   ri   r   rj   r0  ones   &   r&   nanprod_impl np_nanprod.<locals>.nanprod_impl6  s<    IIaLD		A88 ! r%   rW  )r,   r   r\  r0  r[  s   &  @@r&   
np_nanprodr^  +  sb    a%%!''5==))


(CaggE r%   c                   aaa \        V \        P                  4      '       g   R # \        V P                  \        P                  \        P
                  34      '       d   R # V P                  o\        S4      oS! ^4      oVVV3R lpV# )Nc                 .    \         P                  ! V 4      # r+   )re   r   r   s   &r&   r  np_nancumprod.<locals>.<lambda>H  s    Ar%   c                    < \         P                  ! V P                  S4      pSp\        V P                  4       F   w  r4S! V4      ( '       d	   W$,          pW!V&   K"  	  V# r+   r   )r,   r   ri   r   rj   is_nanr[  r   s   &    r&   nancumprod_impl&np_nancumprod.<locals>.nancumprod_implN  sO    ((1665)CA#AFF+1I:FAC , Jr%   rW   r   r   r   r   r   r  )r,   rd  rc  r[  r   s   & @@@r&   np_nancumprodrg  A  sd    a%%!''EMM5==9::&&5!Ah	 r%   c                   aaa \        V \        P                  4      '       g   R # \        V P                  \        P                  \        P
                  34      '       d   R # V P                  o\        S4      oS! ^ 4      oVVV3R lpV# )Nc                 .    \         P                  ! V 4      # r+   )re   r   r   s   &r&   r  np_nancumsum.<locals>.<lambda>a  s    1r%   c                    < \         P                  ! V P                  S4      pSp\        V P                  4       F   w  r4S! V4      ( '       d	   W$,          pW!V&   K"  	  V# r+   r   )r,   r   ri   r   rj   rc  r   rk   s   &    r&   nancumsum_impl$np_nancumsum.<locals>.nancumsum_implg  sO    ((1665)CA#AFF+1I:FAC , Jr%   rf  )r,   rl  rc  r   rk   s   & @@@r&   np_nancumsumrn  Z  sd    a%%!''EMM5==9::%%5!Qx	 r%   c                 R    \        V 4      p\        V4      ^ 8X  d   \        R4      hV# )rb   z&zero-size array reduction not possible)_asarrayrF   r   r,   rh   s   & r&   prepare_ptp_inputrr  s  s'    
1+C
3x1}ABB
r%   c                 d   a  \        V\        P                  4      '       d	   V 3R  lpV# V 3R lpV# )c                    < S! VP                   V P                   4      '       d   V# VP                   V P                   8X  d&   S! VP                  V P                  4      '       d   V# V # r+   r  current_valr   r   s   &&r&   rp  +_compute_current_val_impl_gen.<locals>.impl  sS    #((K,,--
((k...388[%5%566
r%   c                 (   < S! W4      '       d   V# T # r+   r$   ru  s   &&r&   rp  rw    s    S..3?K?r%   )rW   r   r   )r   rv  r   rp  s   f&& r&   _compute_current_val_impl_genry  |  s+    +u}}--	 K	@Kr%   c                     R # r+   r$   rv  r   s   &&r&   _compute_a_maxr|        r%   c                     R # r+   r$   r{  s   &&r&   _compute_a_minr    r}  r%   c                 6    \        \        P                  W4      # r+   )ry  operatorgtr{  s   &&r&   _compute_a_max_implr        (kGGr%   c                 6    \        \        P                  W4      # r+   )ry  r  ltr{  s   &&r&   _compute_a_min_implr    r  r%   c                     R # r+   r$   r   s   &r&   _early_returnr    r}  r%   c                    a ^ o\        V \        P                  4      '       d	   V3R lpV# \        V \        P                  4      '       d	   V3R lpV# V3R lpV# )rb   c                 2  < \         P                  ! V P                  4      '       dn   \         P                  ! V P                  4      '       d/   R \         P                  \         P                  R,          ,           3# R \         P                  R,           3# RS3# )T              ?y                F)re   r0  r   r  nanr   UNUSEDs   &r&   rp   _early_return_impl.<locals>.impl  sb    xx!!88CHH%%"&&2+!555",,f}$r%   c                 h   < \         P                  ! V 4      '       d   R \         P                  3# RS3# r  )re   r0  r  r  s   &r&   rp  r    s(    xx}}RVV|#f}$r%   c                    < R S3# r  r$   r  s   &r&   rp  r    s    &= r%   )rW   r   r   r   )r   rp  r  s   & @r&   _early_return_implr    sN    F#u}}%%	%" K 
C	%	%	% K	!Kr%   c                     \        V R 4      '       d6   \        V P                  \        P                  4      '       d   \        R4      hR pV# )r   +Boolean dtype is unsupported (as per NumPy)c                 
   \        V 4      pVP                  pV^ ,          pV^ ,          p\        VP                  4       F:  pW%,          p\	        V4      w  rxV'       d   Vu # \        WF4      p\        W64      pK<  	  WC,
          # r   )rr  r   r2   r   r  r|  r  )	r,   rh   a_flata_mina_maxr-   r   take_branchretvals	   &        r&   np_ptp_implnp_ptp.<locals>.np_ptp_impl  ss    "q	q	sxxA)C"/"4K"5.E"5.E ! }r%   )hasattrrW   r   r   r   r   )r,   r  s   & r&   np_ptpr    s?     q'aggu}}--KLL" r%   ptpc                     \         P                  ! V 4      '       d   R # \         P                  ! V4      '       d   R# W8  # r"   )re   r0  r  s   &&r&   nan_aware_less_thanr    s)    	xx{{88A;;5Lr%   c                    a a RVV 3R llpV# )Nc                   < W,           ^,	          pS	! W,          W,          4      '       d3   W,          W,          uW&   W&   S'       d   W4,          W1,          uW1&   W4&   S	! W,          W,          4      '       d3   W,          W,          uW&   W&   S'       d   W4,          W2,          uW2&   W4&   S	! W,          W,          4      '       d3   W,          W,          uW&   W&   S'       d   W4,          W1,          uW1&   W4&   W,          pW,          W,          uW&   W&   S'       d   W4,          W2,          uW2&   W4&   TpV^,
          p Wb8  d!   S	! W,          V4      '       d   V^,          pK&  Wq8  d!   S	! WPV,          4      '       d   V^,          pK&  Wg8  d   MFW,          W,          uW&   W&   S'       d   W7,          W6,          uW6&   W7&   V^,          pV^,          pK  W,          W,          uW&   W&   S'       d   W2,          W6,          uW6&   W2&   V# r   r$   )
AlowhighImidpivotr-   jargpartition	pivotimpls
   &&&&    r&   
_partition&_partition_factory.<locals>._partition  s   za QVQV$$VQVNAFAF!"QWaf%%fagOAGQV"#&!'QVQV$$VQVNAFAF!"&!'fagOAGQV1H(yu55Q(y!55QvqtJAD!$T14
adFAFA agGQTMAD!'r%   r+   r$   )r  r  r  s   ff r&   _partition_factoryr    s    , ,Z r%   )r  c                    a  RV 3R llpV# )Nc                   < S! WW44      pWQ8w  d/   WQ8  d   V^,           pS! WW44      pK   V^,
          pS! WW44      pK4  W,          # )z:
Select the k'th smallest element in array[low:high + 1].
r$   )rD  kr  r  r   r-   partitionimpls   &&&&& r&   _select _select_factory.<locals>._select&  sL     $T/fu!e!$T71u!$T7wr%   r+   r$   )r  r  s   f r&   _select_factoryr  %  s     Nr%   c                    W28  g   Q h\        WV4      pWA8  d   V^,           pK&  WA^,           8  d   V^,
          pK>  WA8X  d   \        W^,           V^,           V4       M\        WW$^,
          4        W,          W^,           ,          3# )z
Select the k'th and k+1'th smallest elements in array[low:high + 1].

This is significantly faster than doing two independent selections
for k and k+1.
)r  r  )rD  r  r  r  r-   s   &&&& r&   _select_twor  ;  s}     zzt$'5a%CQYq5DVDa%Q-DSa%(7DQKr%   c                    ^ pV^,
          pV^,	          pV^,          ^ 8X  d%   \        W^,
          W#4      w  rVWV,           ^,          # \        WW#4      # )zh
The main logic of the median() call.  *temp_arry* must be disposable,
as this function will mutate it.
)r  r  )	temp_arrynr  r  halfr,   r  s   &&     r&   _median_innerr  T  sQ     Cq5D6D1uz9Qh:{y22r%   c                    a \        V \        P                  4      '       g   R # \        V P                  4      P
                  R9   oV3R lpV# )NmMc                    < V P                  4       pVP                  ^ ,          pS'       g   V^ 8X  d   \        P                  # \	        W4      # r   )flattenr   re   r  r  )r,   r  r  is_datetimes   &  r&   median_implnp_median.<locals>.median_implk  s;     IIK	OOAqAv66MY**r%   )rW   r   r   r   r   char)r,   r  r  s   & @r&   	np_medianr  d  s=    a%%177#((D0K+ r%   c                    \        V 4      pV^8X  d:   \        P                  ! \        V4      V ^ ,          \        P                  R7      pV# \        P                  ! \        V4      \        P                  R7      p\        \        V4      4       EF;  pW,          pV^d8X  dw   \        P                  ! V 4      p\        P                  ! \        P                  ! V 4      4      ( '       d.   \        P                  ! V4      ( '       d   \        P                  pEMV^ 8X  Ed   \        P                  ! V 4      p\        P                  ! \        P                  ! V 4      4      ( '       d   \        P                  ! V \        P                  8H  4      p\        P                  ! V \        P                  ) 8H  4      pW(V,           ,
          p	V	^ 8X  d   \        P                  pV^8X  d   V^8X  d   \        P                  pV^8  d   \        P                  pV	^8X  d   V^8  d   V^8w  d   \        P                  pM^V^,
          \        P                  ! VR4      ,          ,           p
\        P                  ! V
4      pW,
          p\!        V \#        V^,
          4      ^ V^,
          R7      w  rV^V,
          ,          W,          ,           pWcV&   EK>  	  V# )r   r.        Y@)r  r  r  )rF   re   r   r   r   r2   r3  ry  isfiniter  r  r  inftrue_dividemathfloorr  int)r,   qr  r   r-   
percentiler   num_pos_infnum_neg_inf
num_finiterankfr   loweruppers   &&             r&   _collect_percentiles_innerr  v  s    	AAAvggc!fad"**5T JQ hhs1vRZZ0s1vAJ S ffQiFF2;;q>**C(( ff qffQiFF2;;q>**"$&&bff"5K"$&&rvvg"6K!"K&?!@J!Q ff"a'AF ff"Q ff!Q&?*a/&(ff AER^^J%FFFJJt$H*1AE
QPq1uo	1FK N Jr%   c                     V'       d   W( ,          p \        V 4      ^ 8X  d   R# M\        P                  ! V4      '       d   R# \        V 4      ^8X  d    V ^ ,          p\        P                  ! V4      # R# )rb   FT)rF   re   r  r  )r,   nan_maskskip_nanr   s   &&& r&   _can_collect_percentilesr    s[    iLq6Q;  66(
1v{d{{3r%   c                    R pV P                   ^8X  dr   V P                  ^
8  da   \        V P                  4       FD  pW,          R8  g2   W,          V8  g%   \        P                  ! W,          4      '       g   KA  Rp V# 	   V# \        P
                  ! \        P                  ! V 4      4      '       g>   \        P
                  ! V R8  4      '       g   \        P
                  ! W8  4      '       d   RpV# )Tr   F)r   r   r2   re   r0  r  )r  q_upper_boundvalidr-   s   &&  r&   check_validr    s    E 	vv{qvv{qvvAtczQTM1RXXad^^
 L  L 66"((1+"&&S//RVVA<M5N5NELr%   c                 B    \        V R R7      '       g   \        R4      hR# )r  r  z)Percentiles must be in the range [0, 100]Nr  r   r  s   &r&   percentile_is_validr    s     q..DEE /r%   c                 B    \        V R R7      '       g   \        R4      hR# )r  r  z%Quantiles must be in the range [0, 1]Nr  r  s   &r&   quantile_is_validr    s     q,,@AA -r%   c                    \         P                  ! V\         P                  R 7      P                  4       pV! V4       W,          p\         P                  ! V \         P                  R 7      P                  4       p\         P                  ! V4      p\        WVV4      '       d   WV( ,          p\        WQ4      pV# \         P                  ! \        V4      \         P                  4      pV# r-  )
re   r  r   r  r0  r  r  r   rF   r  )r,   r  check_qfactorr  r  r  r   s   &&&&&   r&   _collect_percentilesr    s    


1BJJ'//1AAJ	
A

1BJJ/779Ixx	"H	X>>i(	(6 J ggc!fbff%Jr%   c                x  aaa \        V 4      p\        P                  ! V\        P                  4      '       d   \	        R4      hVVV3R lpVVV3R lp\        V\        P                  \        P                  34      '       d   V# \        V\        P                  4      '       d   VP                  ^ 8X  d   V# V# )z
The underlying algorithm to find percentiles and quantiles
is the same, hence we converge onto the same code paths
in this inner function implementation
zNot supported for complex dtypec                 .   < \        WSSS4      ^ ,          # r   r  r,   r  r  r  r  s   &&r&   np_percentile_q_scalar_impl?_percentile_quantile_inner.<locals>.np_percentile_q_scalar_impl  s    #A'68DQGGr%   c                     < \        WSSS4      # r+   r  r  s   &&r&   np_percentile_impl6_percentile_quantile_inner.<locals>.np_percentile_impl  s    #A'68DDr%   )r  re   r  r  r   rW   r   r   r   r   r   )r,   r  r  r  r  r  r  r  s   &&fff   r&   _percentile_quantile_innerr    s     
	B	}}R++,,;<<HE !ellEMM233**	Au{{	#	#!**!!r%   c                 (    \        WR R\        R7      # )Fr  r  r  r  r  r  r,   r  s   &&r&   np_percentiler    s    %	uS2E r%   c                 (    \        WR R\        R7      # )Tr  r  r  r  s   &&r&   np_nanpercentiler    s    %	tC1D r%   c                 (    \        WR R\        R7      # )Fr  r  r  r  r  s   &&r&   np_quantiler    s    %	uU4E r%   c                 (    \        WR R\        R7      # )Tr  r  r  r  s   &&r&   np_nanquantiler    s    %	tE3D r%   c                    a \        V \        P                  4      '       g   R # \        V P                  4      oV3R lpV# )Nc                 6  < \         P                  ! V P                  V P                  4      p^ p\         P                  ! V 4       F0  pVP                  4       pS! V4      '       d   K#  WAV&   V^,          pK2  	  V^ 8X  d   \         P                  # \        W4      # r   )re   r   r   r   rf   rg   r  r  )r,   r  r  r   rj   r0  s   &    r&   nanmedian_impl$np_nanmedian.<locals>.nanmedian_impl'  ss    HHQVVQWW-	IIaLD		A88 !Q	 ! 666MY**r%   rE  )r,   r  r0  s   & @r&   np_nanmedianr	  !  s2    a%%aggE+  r%   c                    \         P                  ! V 4      p\         P                  ! V P                  R R 4      pV FH  pW,          P	                  4       p^ p\        V4      ^,
          pV F  p\        WXWg4       TpK  	  WRV&   KJ  	  V# )Nrg  )re   
empty_likendindexr   copyrF   _select_w_nan)	r,   	kth_arrayr   r   srD  r  r  kths	   &&       r&   np_partition_impl_innerr  :  s|    
 --
C
**QWWSb\
"Ctyy{4y1}C$S/C  A  Jr%   c           	      t   \         P                  ! V \         P                  R 7      p\         P                  ! V P                  RR 4      pV Fh  pW,          P                  4       p\         P                  ! \        V4      4      p^ p\        V4      ^,
          pV F  p	\        WYWxV4       T	pK  	  WbV&   Kj  	  V# )r.  Nrg  )	re   r  r4   r  r   r  arangerF   _arg_select_w_nan)
r,   r  r   r   r  rD  idx_arryr  r  r  s
   &&        r&   np_argpartition_impl_innerr  O  s    
 --
)C
**QWWSb\
"Ctyy{99SY'4y1}CdH=C  A  Jr%   c                   \        V4      P                  \        P                  4      pVP                  ^8w  d   \        R4      h\        P                  ! \        P                  ! V4      V P                  R,          8  4      '       d   \        R4      h\        P                  ! V4      p\        P                  ! V4       F-  w  rEV^ 8  d   WPP                  R,          ,           W4&   K)  WSV&   K/  	  \        P                  ! V4      # )ai  
Returns a sorted, unique array of kth values which serve
as indexers for partitioning the input array, a.

If the absolute value of any of the provided values
is greater than a.shape[-1] an exception is raised since
we are partitioning along the last axis (per Numpy default
behaviour).

Values less than 0 are transformed to equivalent positive
index values.
zkth must be scalar or 1-Dzkth out of boundsrg  )rp  astypere   r   r   r   r  r  r   r  ndenumerateunique)r,   r  r  r   indexr   s   &&    r&   
valid_kthsr  e  s     $$RXX.I~~455 
vvbffY1772;.//,--
--	
"CnnY/
7wwr{*CJJ	 0 99S>r%   c                    \        V \        P                  \        P                  \        P                  34      '       g   \        R 4      h\        V \        P                  4      '       d   V P                  ^ 8X  d   Rp\        V4      h\        VRV4      p\        R8  d   \        P                  pM \        P                  \        P                  3p\        W44      '       g   \        R4      hR pV# )(The first argument must be an array-like3The first argument must be at least 1-D (found 0-D)r   Partition index must be integerc                     \        V 4      pVP                  ^ 8X  d   VP                  4       # \        W!4      p\	        W#4      # r   )rp  r   r  r  r  r,   r  a_tmpr  s   &&  r&   np_partition_impl'np_partition.<locals>.np_partition_impl  s7    ::?::<"5.I*5<<r%         rW   r   r   SequencerZ   r   r   r   r   r   r   )r,   r  r   kthdt	kth_typesr%  s   &&    r&   np_partitionr.    s     a%++u~~u{{CDDGHH!U[[!!affkCS!!C#&EMM	]]EMM2	e''>??= r%   c                    \        V \        P                  \        P                  \        P                  34      '       g   \        R 4      h\        V \        P                  4      '       d   V P                  ^ 8X  d   Rp\        V4      h\        VRV4      p\        R8  d   \        P                  pM \        P                  \        P                  3p\        W44      '       g   \        R4      hR pV# )r  r   r   r!  c                     \        V 4      pVP                  ^ 8X  d    VP                  4       P                  R4      # \	        W!4      p\        W#4      # )rb   r4   )rp  r   r  r  r  r  r#  s   &&  r&   np_argpartition_impl-np_argpartition.<locals>.np_argpartition_impl  sB    ::?::<&&v.."5.I-e??r%   r'  r*  )r,   r  r   r,  r-  r1  s   &&    r&   np_argpartitionr3    s     a%++u~~u{{CDDGHH!U[[!!affkCS!!C#&EMM	]]EMM2	e''>??@  r%   c                 (   \        ^ V 4      \        ^ V4      3p\        P                  ! V\        P                  R7      p\	        V^ ,          4       F=  p\        \        ^ WR,           ^,           4      V^,          4      p^WERV13&   ^ WEVR13&   K?  	  V# rb   r.  N)r3  re   r   r   r2   r  )NMr  r   r   r-   m_maxs   &&&    r&   	_tri_implr9    s~    1Is1ay E
((5


+C58_C1519%uQx0vvIuvI 
 Jr%   c                 (    \        VR 4       RR lpV# )r  c                 &    Vf   T p\        WV4      # r+   )r9  )r6  r7  r  s   &&&r&   tri_implnp_tri.<locals>.tri_impl  s    9Aq!!r%   Nrb   )r   )r6  r7  r  r<  s   &&& r&   np_trir?    s     Q"
 Or%   c                    V P                   ^8X  g   Q h\        V 4      p\        P                  ! W3V P                  R7      p\        V4       F  pWV&   K	  	  V# )ze
Takes a 1d array and tiles it to form a square matrix
- i.e. a facsimile of np.tile(m, (len(m), 1))
r.  )r   rF   re   r   r   r2   )r   len_mr   r-   s   &   r&   _make_squarerB    sO     66Q;;FE
((E>
1C5\A  Jr%   c           	         \         P                  ! V P                  R,          V P                  R,          VR7      P                  \         P                  4      p\         P
                  ! W \         P                  ! W P                  R7      4      # r(  r7  r  r.  rg  re   trir   r  uintwhere
zeros_liker   r   r  masks   && r&   np_tril_impl_2drN    sQ    66!''"+299"''BD88DR]]1GG<==r%   c                     \        VR 4       RR lpRR lpV P                  ^8X  d   V# V P                  ^8X  d   \        # V# )r  c                 .    \        V 4      p\        W!4      # r+   )rB  rN  r   r  m_2ds   && r&   np_tril_impl_1d my_tril.<locals>.np_tril_impl_1d      At''r%   c                    \         P                  ! V P                  R,          V P                  R,          VR7      P                  \         P                  4      p\         P
                  ! V P                  RR 4      p\         P                  ! V 4      p\         P                  ! W P                  R7      pV F#  p\         P                  ! W V,          V4      WF&   K%  	  V# r(  rE  Nr.  rF  rg  
re   rH  r   r  rI  r  r  rK  r   rJ  r   r  rM  r   zzero_optsels   &&     r&   np_tril_impl_multi#my_tril.<locals>.np_tril_impl_multi  s    vvaggbkQWWR[A6==bggFjj"&MM!==WW5CXXdcFH5AF r%   r   )r   r   rN  )r   r  rS  r]  s   &&  r&   my_trilr_    sB     Q( 	vv{	
1!!r%   c                 z    \        V R 4       \        VR4       \        V4      '       g   \        VR4       RR lpV# )r  r  r   c                 Z    \         P                  ! \         P                  ! WVR 7      4      # )r  re   nonzerorH  r  r  r   s   &&&r&   np_tril_indices_impl-np_tril_indices.<locals>.np_tril_indices_impl  s    zz"&&+,,r%   rb   Nr   r   )r  r  r   rf  s   &&& r&   np_tril_indicesrj    s6     QQq>>C -r%   c                 `    \        VR 4       V P                  ^8w  d   \        R4      hRR lpV# )r  input array must be 2-dc                 v    \         P                  ! V P                  ^ ,          WP                  ^,          R7      # rb   )r  r   )re   tril_indicesr   rh   r  s   &&r&   np_tril_indices_from_impl7np_tril_indices_from.<locals>.np_tril_indices_from_impl+  #    syy|qIIaLAAr%   r   r   r   r   )rh   r  rq  s   && r&   np_tril_indices_fromru  "  1     Q
xx1}344B$$r%   c                 .   \         P                  ! V P                  R,          V P                  R,          V^,
          R7      P                  \         P                  4      p\         P
                  ! V\         P                  ! W P                  R7      V 4      # rD  rG  rL  s   && r&   np_triu_impl_2drx  0  sW    66!''"+A6==bggFD88D"--91==r%   c                     \        VR 4       RR lpRR lpV P                  ^8X  d   V# V P                  ^8X  d   \        # V# )r  c                 .    \        V 4      p\        W!4      # r+   )rB  rx  rQ  s   && r&   np_triu_impl_1d my_triu.<locals>.np_triu_impl_1d;  rU  r%   c                    \         P                  ! V P                  R,          V P                  R,          V^,
          R7      P                  \         P                  4      p\         P
                  ! V P                  RR 4      p\         P                  ! V 4      p\         P                  ! W P                  R7      pV F"  p\         P                  ! W%W,          4      WF&   K$  	  V# rW  rX  rY  s   &&     r&   np_triu_impl_multi#my_triu.<locals>.np_triu_impl_multi?  s    vvaggbkQWWR[AE:AA"''Jjj"&MM!==WW5CXXdaf5AF r%   r   )r   r   rx  )r   r  r{  r~  s   &&  r&   my_triur  6  sB     Q( 	vv{	
1!!r%   c                 z    \        V R 4       \        VR4       \        V4      '       g   \        VR4       RR lpV# )r  r  r   c           	      v    \         P                  ! ^\         P                  ! WV^,
          R7      ,
          4      # )r   rb  rc  re  s   &&&r&   np_triu_indices_impl-np_triu_indices.<locals>.np_triu_indices_implY  s%    zz!bffQQU3344r%   rh  ri  )r  r  r   r  s   &&& r&   np_triu_indicesr  P  s6     QQq>>C 5r%   c                 `    \        VR 4       V P                  ^8w  d   \        R4      hRR lpV# )r  rl  c                 v    \         P                  ! V P                  ^ ,          WP                  ^,          R7      # rn  )re   triu_indicesr   rp  s   &&r&   np_triu_indices_from_impl7np_triu_indices_from.<locals>.np_triu_indices_from_implg  rs  r%   r   rt  )rh   r  r  s   && r&   np_triu_indices_fromr  ^  rv  r%   c                     R # r+   r$   rh   s   &r&   _prepare_arrayr  l  r}  r%   c                 <    V R \         P                  39   d   R # R # )Nc                 .    \         P                  ! R4      # )Nr$   re   arrayr  s   &r&   r  %_prepare_array_impl.<locals>.<lambda>s  s    288B<r%   c                 4    \        V 4      P                  4       # r+   )rp  ri  r  s   &r&   r  r  u  s    8C=..0r%   r   noner  s   &r&   _prepare_array_implr  p  s    
tUZZ  ''00r%   c                    T p \        V\        P                  \        P                  34      '       d   \	        V4      # \        VRR4      pVe   V! 4       ^ 8X  d   \        P                  # \        VRR4      pVf   \        R4      h\        V\        P                  4      '       d   VP                  pK  \	        V4      # )T__len__Nr   ztype has no dtype attr)rW   r   r   r   r   r   re   r   r   r+  r   )inobjobjlr  s   &   r&   _dtype_of_compoundr  x  s    
C
cELL%--899C= CD)=QSAX::S'4(: !9::c5>>**))CB<r%   c                    \        V \        P                  4      '       d6   \        V P                  \        P                  4      '       d   \        R 4      h\        V 4      pRp\        V4      '       g   \        V4      pRp\        V4      '       g   \        V4      pVe*   \        P                  ! WC4      '       g   Rp\        V4      hVe*   \        P                  ! WS4      '       g   Rp\        V4      hRR lpV# )r  Nz3dtype of to_begin must be compatible with input aryz1dtype of to_end must be compatible with input aryc                 6   \        V4      p\        V 4      p\        V4      pVP                  p\        V4      ^ 8  d   \        P                  ! \        V4      \        V4      ,           \        V4      ,           ^,
          VR7      p\        V4      p\        V4      \        V4      ,           ^,
          p	W7RV% \        P
                  ! V4      WxV	% WWV	R% V# \        P                  ! \        V4      \        V4      ,           VR7      p\        V4      pW7RV% WWVR% V# r5  )r  r   rF   re   r   diff)
aryto_endto_beginstartr  end	out_dtyper   	start_idxmid_idxs
   &&&       r&   np_ediff1d_impl#np_ediff1d.<locals>.np_ediff1d_impl  s    x(S!V$II	 s8a<((CJS1CH<q@!*,CE
I%j3s8+a/G#
O%'WWS\C'"M 
	 ((CJS1)DCE
I#
O!	
O
r%   r  )
rW   r   r   r   r   r   r  r   re   can_cast)r  r  r  ary_dtto_begin_dt	to_end_dtr   r  s   &&&     r&   
np_ediff1dr    s     #u{{##cii// !NOO
  $FK!!(2I&v.	r{{;'G'GCS!!R[[%C%CAS!!6 r%   c                     R # r+   r$   r  s   &r&   _select_elementr    r}  r%   c                 F    \        V R R4      ^ 8H  pV'       d   R pV# R pV# )r   Nc                 `    \         P                  ! RV P                  R7      pWR&   V^ ,          # )r   r.  NNNr  )re   r  r   )rh   r  s   & r&   rp  "_select_element_impl.<locals>.impl  s&    SYY/AaDQ4Kr%   c                     V # r+   r$   r  s   &r&   rp  r    s    Jr%   )r   )rh   zerodrp  s   &  r&   _select_element_implr    s.    C&!+E	 	r%   c                     R # r+   r$   )dxr  s   &&r&   _get_dr    r}  r%   c                 8    \        V 4      '       d   R  pV# R pV# )c                 .    \         P                  ! V4      # r+   re   r  r  r  s   &&r&   rp  get_d_impl.<locals>.impl  s    ::b>!r%   c                 V    \         P                  ! \         P                  ! V 4      4      # r+   )re   r  r  r  s   &&r&   rp  r    s    772::a=))r%   r  )r  r  rp  s   && r&   
get_d_implr    s!    1~~	"
 K	*Kr%   c                    \        V \        P                  \        P                  34      '       d   \	        R4      h\        V \        P
                  4      '       d   V P                  ^ 8X  d   \	        R4      hRR lpV# )z9Shared implementation for both np.trapz and np.trapezoid.zy cannot be a scalarzy cannot be 0Dc                    \         P                  ! V 4      p\        W4      pVR \        ^R4      3,          VR \        RR4      3,          ,           R,          p\         P                  ! WE,          R4      p\        V4      pV# ).N       @rg  )re   r  r  rO   r  r  )r!  r  r  yarrdy_averet	processeds   &&&     r&   rp  _trapz_impl.<locals>.impl  si    zz!}1Mc5D>)*T#uT22F-GG3NffQY##C(	r%   Nr  )rW   r   r   r   r   r   r   )r!  r  r  rp  s   &&& r&   _trapz_implr    s[    !ellEMM233011	Au{{	#	#!*++
 Kr%   c                     \        WV4      # r+   r  r!  r  r  s   &&&r&   np_trapzr        1$$r%   c                     \        WV4      # r+   r  r  s   &&&r&   np_trapezoidr  	  r  r%   c                   VP                   w  rEV\        V 4      8X  g   Q hWQ8X  g   Q hV'       dP   \        V4       F>  pV^ 8X  d
   ^VRV3&   K  \        P                  ! WRV^,
          3,          4      VRV3&   K@  	  R# \        V^,
          RR4       FD  pWa^,
          8X  d
   ^VRV3&   K  \        P                  ! WRV^,           3,          4      VRV3&   KF  	  R# )a  
Generate an N-column Vandermonde matrix from a supplied 1-dimensional
array, x. Store results in an output matrix, out, which is assumed to
be of the required dtype.

Values are accumulated using np.multiply to match the floating point
precision behaviour of numpy.vander.
r  Nrg  )r   rF   r2   re   r  )r  r6  
increasingr   r   r  r-   s   &&&&   r&   
_np_vanderr  	  s     99DAA;;6M6qAAvAqD	KKq1q5z?;AqD		  q1ub"%AEzAqD	KKq1q5z?;AqD		 &r%   c                 b    V P                   ^8  d   \        R4      hV^ 8  d   \        R4      hR# )r   z.x must be a one-dimensional array or sequence.z#Negative dimensions are not allowedN)r   r   )r  r6  s   &&r&   _check_vander_paramsr  "	  s1    vvzIJJ1u>?? r%   c                   a VR \         P                  39  d,   \        V\         P                  4      '       g   \	        R4      hRV3R llpRR lp\        V \         P
                  4      '       d3   \        V P                  4      p\        P                  ! V\        4      oV# \        V \         P                  \         P                  34      '       d   V# R # )Nz,Second argument N must be None or an integerc                    < Vf   \        V 4      p\        W4       \        P                  ! \        V 4      \	        V4      3SR7      p\        WW#4       V# Nr.  )rF   r  re   r   r  r  )r  r6  r  r   r   s   &&& r&   np_vander_impl!np_vander.<locals>.np_vander_impl0	  sG    9AAQ" hhAA'u51)
r%   c                     Vf   \        V 4      p\        P                  ! V 4      p\        W14       \        P                  ! \        V 4      \        V4      3VP                  R7      p\        W1W$4       V# r  )rF   re   r  r  r   r  r   r  )r  r6  r  x_arrr   s   &&&  r&   np_vander_seq_impl%np_vander.<locals>.np_vander_seq_impl<	  sW    9AAU& hhAA'u{{;5Z-
r%   r  )r   r  rW   r   r   r   r   r   re   promote_typesr  rZ   r+  )r  r6  r  r  r  x_dtr   s   &&&   @r&   	np_vanderr  *	  s    uzz""!U]]++LMM
 !U[[!!   s+	AU^^4	5	5!! 
6r%   c                     \        V\        P                  \        P                  34      '       g   \	        R 4      hR p\        V \        P
                  \        P                  34      '       d   R # V# )zshift must be an integerc                 6   \         P                  ! V 4      p\         P                  ! VP                  VP                  R 7      pVP
                  p\        VP                  4       F1  pWQ,           VP                  ,          pWE,          VP
                  V&   K3  	  V# r-  )re   r  r   r   r   r   r2   r   )r,   shiftrh   r   arr_flatr-   r   s   &&     r&   np_roll_implnp_roll.<locals>.np_roll_implW	  sj    jjmhhsyy		2 88sxxA9(C$KCHHSM ! 
r%   c                 .    \         P                  ! V 4      # r+   r  )r,   r  s   &&r&   r  np_roll.<locals>.<lambda>d	  s    

1r%   )rW   r   r   r   r   r   )r,   r  r  s   && r&   np_rollr  R	  sU    eemmU]];<<455
 !ellEMM233--r%   c                 .   ^ pTpWV^,
          ,          8  d   V# W^ ,          8  d   R# V^8:  d*   ^pWb8  d   WV,          8  d   V^,          pK  V^,
          # W2^,
          8  d
   V^,
          pV^8  d   ^pWV,          8  dX   WV^,
          ,          8  d;   V^,
          pV\         8  d&   WV\         ,
          ,          8  d   V\         ,
          pMV^,
          # WV^,           ,          8  d   V# WV^,           ,          8  d
   V^,           # V^,           pW2\         ,
          ^,
          8  d&   WV\         ,           ,          8  d   V\         ,           pWE8  d3   WEV,
          ^,	          ,           pWV,          8  d   V^,           pK4  TpK8  V^,
          # rb   rg  )LIKELY_IN_CACHE_SIZE)keyrh   lengthguessiminimaxr-   imids   &&&&    r&   binary_search_with_guessr  o	  st    DD !_	1v	 {jSF]FA1uz
qy ZUQY19D ++u';;<<33 19 UQYL ^#qy  qy&::Q>?5+?#?@@ #77D +t)*d)!8DD!8Or%   c                    \         P                  ! V 4      p\         P                  ! V4      p\         P                  ! V4      p\        V4      ^ 8X  d   \        R4      h\        V4      \        V4      8w  d   \        R4      hVP                  ^8X  d+   \         P
                  ! VP                  V^ ,          VR7      # \         P                  ! VP                  VR7      pVP                  p\        V4      p	V^ ,          p
Wi^,
          ,          pV	^8X  dt   V^ ,          pV^ ,          p\        V4       FP  pVP                  V,          pW8  d   WP                  V&   K,  W8  d   WP                  V&   KB  WP                  V&   KR  	  V# ^ pW8:  d!   \         P                  ! V	^,
          VR7      pM\         P                  ! ^ VR7      pVP                  '       d   \        V	^,
          4       F  p^W^^,           ,          W^,          ,
          ,          pWn^,           ,          P                  Wn,          P                  ,
          V,          pWn^,           ,          P                  Wn,          P                  ,
          V,          pVRV,          ,           VV&   K  	  \        V4       EF  pVP                  V,          p\         P                  ! V4      '       d$   TpRpVRV,          ,           VP                  V&   KV  \        WV	V4      pVR8X  d   WP                  V&   Kz  VV	8X  d   WP                  V&   K  VV	^,
          8X  d   VV,          VP                  V&   K  VV,          V8X  d   VV,          VP                  V&   K  VP                  '       d   VV,          pM^VV^,           ,          VV,          ,
          ,          pVV^,           ,          P                  VV,          P                  ,
          V,          pVV^,           ,          P                  VV,          P                  ,
          V,          pVRV,          ,           pVP                  WV,          ,
          ,          VV,          P                  ,           p\         P                  ! V4      '       d   VP                  WV^,           ,          ,
          ,          VV^,           ,          P                  ,           p\         P                  ! V4      '       dD   VV,          P                  VV^,           ,          P                  8X  d   VV,          P                  pVP                  WV,          ,
          ,          VV,          P                  ,           p\         P                  ! V4      '       d   VP                  WV^,           ,          ,
          ,          VV^,           ,          P                  ,           p\         P                  ! V4      '       dD   VV,          P                  VV^,           ,          P                  8X  d   VV,          P                  pVRV,          ,           VP                  V&   EK  	  V# )rb   array of sample points is empty#fp and xp are not of the same size.
fill_valuer   r.  r  r   rg  )re   r  rF   r   r   r   r   r   r2   r   r   r  r0  r  )r  xpfpr   dzr  dydreslenxlenxplvalrvalxp_valfp_valr-   x_valr  slopesinv_dxr   r  slopes   &&&&                  r&   np_interp_impl_complex_innerr  	  sN    
AB	BB	BB
2w!|:;;
2w#b'>??	ww!|wwrxxBqE??88BHHE*D77DGEa5Dai=DzAAtAGGAJE~#		!#		!%		! V KC  =XXuqy7FXXau-F;;;519%bQi"%/0q5	3v=q5	3v= 29,q		 & tAGGAJExx#b4i/		!(E1=ABw#		!e#		!eai!!u		!A%!!u		!;;;"1IE"QU)be"34Fq1uINNRUZZ76ADq1uINNRUZZ76AD 29,E zzUU]3bejj@88D>> ::AE):;bQinnLDxx~~"Q%**1q5	*F!!uzzzzUU]3bejj@88D>> ::AE):;bQinnLDxx~~"Q%**1q5	*F!!uzz#b4i/		!a d Kr%   c                    \         P                  ! V \         P                  R 7      p\         P                  ! V\         P                  R 7      p\         P                  ! V\         P                  R 7      p\        V4      ^ 8X  d   \	        R4      h\        V4      \        V4      8w  d   \	        R4      hVP
                  ^8X  d+   \         P                  ! VP                  V^ ,          VR7      # \         P                  ! VP                  VR 7      pVP
                  p\        V4      p	V^ ,          p
Wi^,
          ,          pV	^8X  dt   V^ ,          pV^ ,          p\        V4       FP  pVP                  V,          pW8  d   WP                  V&   K,  W8  d   WP                  V&   KB  WP                  V&   KR  	  V# ^ pW8:  d-   VR,          VRR ,
          VR,          VRR ,
          ,          pM\         P                  ! ^ VR 7      p\        V4       EF,  pVP                  V,          p\         P                  ! V4      '       d   WP                  V&   KC  \        WV	V4      pVR8X  d   WP                  V&   Kg  VV	8X  d   WP                  V&   K~  VV	^,
          8X  d   VV,          VP                  V&   K  VV,          V8X  d   VV,          VP                  V&   K  VP
                  '       d   VV,          pMAVV^,           ,          VV,          ,
          VV^,           ,          VV,          ,
          ,          pVWV,          ,
          ,          VV,          ,           VP                  V&   \         P                  ! VP                  V,          4      '       g   EK  VWV^,           ,          ,
          ,          VV^,           ,          ,           VP                  V&   \         P                  ! VP                  V,          4      '       g   EK  VV,          VV^,           ,          8X  g   EK  VV,          VP                  V&   EK/  	  V# )r.  r  r  r  r   NNNrg  )re   r  r   rF   r   r   r   r   r   r2   r   r0  r  )r  r  r  r   r   r  r  r  r  r  r  r  r  r  r-   r	  r  r
  r  s   &&&&               r&   np_interp_impl_innerr  "
  s    
ARZZ	(B	Bbjj	)B	Bbjj	)B
2w!|:;;
2w#b'>??	ww!|wwrxxBqE??88BHHE*D77DGEa5Dai=DzAAtAGGAJE~#		!#		!%		! n K[  =fr#2w&2b6BsG+;<FXXau-FtAGGAJExx$		!(E1=ABw#		!e#		!eai!!u		!A%!!u		!;;;"1IEAYA.2a!e9r!u3DEE$16A>		! 88DIIaL))#(Eq1uI,=#>AE#JDIIaLxx		!--"Q%2a!e92D')!u		!G J Kr%   c                   aa	 \        VR 4      '       d   VP                  ^8  d   \        R4      h\        VR 4      '       d   VP                  ^8  d   \        R4      hRp\        V4      p\        P
                  ! V\        P                  4      '       d   \        V4      h\        V4      p\        P                  ! V\        P                  4      o\        P
                  ! S\        P                  4      '       d   \        o	M\        o	VV	3R lpVV	3R lp\        V \        P                  4      '       d.   \        V \        P                  4      '       d   \        V4      hV# V# )r   zxp must be 1Dzfp must be 1Dz:Cannot cast array data from complex dtype to float64 dtypec                    < S! WVS4      # r+   r$   r  r  r  r   r   s   &&&r&   np_interp_impl!np_interp.<locals>.np_interp_impl
  s    QB&&r%   c                 :   < S! WVS4      P                   ^ ,          # r   )r   r  s   &&&r&   np_interp_scalar_impl(np_interp.<locals>.np_interp_scalar_impl
  s    QB&++A..r%   )r  r   r   r  re   r  r  result_typer   r  r  rW   r   r   r   )
r  r  r  complex_dtype_msgxp_dtfp_dtr  r  r   r   s
   &&&     @@r&   	np_interpr  {
  s    r6rww{/**r6rww{/** 	E  BE	}}UB..//+,,BENN5"**-E	}}UB..//,$'/ !U\\""a''/00$$r%   c                    V P                   ^8X  g   Q hV P                  w  r\        P                  ! V^3V P                  R7      p\        V4       F,  p\        P                  ! WR3,          4      V,          W4^ 3&   K.  	  V# )r(  r.  r  )r   r   re   r   r   r2   r  )r,   r   r  r   r-   s   &    r&   row_wise_averager  
  sh    66Q;;77DA
((Aq6
)C1XFF1T7Oa'qD	  Jr%   c                 >   Vf   V'       d   ^ pM^pV P                   ^,          V,
          p\        VR4      pV \        V 4      ,          p \        P                  ! V \        P
                  ! V P                  4      4      pV\        P                  ! ^V4      ,          pV# )Nr   )r   r3  r  re   dotr   Tr  )Xbiasddoffactri   s   &&&  r&   np_cov_impl_innerr'  
  s     |DD 771:D tS>D 	!	A 	q"''!##,A4	  AHr%   c                      R # r+   r$   r$   r%   r&   _prepare_cov_input_innerr)  
  r}  r%   c                 D    VR \         P                  39   d   R pV# R pV# )Nc                 l    \         P                  ! \        V 4      4      pV'       g   VP                  pV# r+   )re   
atleast_2drp  r"  )r   r!  rowvarr   m_arrs   &&&& r&   r)  9_prepare_cov_input_impl.<locals>._prepare_cov_input_inner
  s%    MM(1+.ELr%   c                    \         P                  ! \        V 4      4      p\         P                  ! \        V4      4      pV'       gI   VP                  ^ ,          ^8w  d   VP                  pVP                  ^ ,          ^8w  d   VP                  pVP                  w  rgVP                  w  rWy8w  d   \        R4      h\         P                  ! Wh,           V3VR7      p
WJRV1R3&   WZV) R1R3&   V
# )rb   z$m and y have incompatible dimensionsr.  Nr  )re   r,  rp  r   r"  r   r   )r   r!  r-  r   r.  y_arrm_rowsm_colsy_rowsy_colsr   s   &&&&       r&   r)  r/  
  s    MM(1+.EMM(1+.E
 ;;q>Q&!GGE;;q>Q&!GGE"[[NF"[[NF !GHH ((FOV4EBC#
O$!Jr%   r  )r   r!  r-  r   r)  s   &&&& r&   _prepare_cov_input_implr6  
  s.    T5::	D $#5	4 $#r%   c                 v    V P                   ^8X  d(   V P                  ^ ,          ^8X  d   Rp\        V4      hR# R# )r(  z2D array containing a single row is unsupported due to ambiguity in type inference. To use numpy.cov in this case simply pass the row as a 1D array, i.e. m[0].N)r   r   rO  )r   r   s   & r&   _handle_m_dim_changer8  
  s6    vv{qwwqzQ? 3	 '{r%   c                     V # r+   r$   r  s   &r&   r  r    s    qr%   c                     \         P                  p\        V \        P                  4      '       d   \        V P                  4      pV# \        V \        P                  \        P                  34      '       d   \        V 4      pV# \        V \        P                  \        P                  34      '       d   \        4       pV  FG  p\        VR 4      '       d"   V Uu. uF  qBP                  V4      NK  	   pK6  VP                  V4       KI  	  \        V4      ^8  d0   \         P                  ! V Uu. uF  p\        V4      NK  	  up!  pV# \        V4      ^8X  d   \        VP!                  4       4      pV# u upi u upi )rB  )re   r   rW   r   r   r   r   r   r   rG   rZ   setr  addrF   r  r   )
array_likearray_like_dtcoltypesr   rj   tys   &     r&   r  r    s(   JJM*ekk** !1!12  
Ju}} =	>	> ,  
J =	>	>5CsG$$*-.#Qa#.S!	 
 x=1,,h.Ohx|h.OPM  ]a$X\\^4M / /Ps   E60E;c                    \        V \        P                  4      '       d.   V P                  ^8  d   \	        RP                  V4      4      hR# \        V \        P                  4      '       d   \        V P                  ^ ,          \        P                  4      '       da   \        V P                  ^ ,          P                  ^ ,          \        P                  4      '       d   RP                  V4      p\	        V4      hR# R# R# )r(  z{0} has more than 2 dimensionsN)rW   r   r   r   r   formatr+  r  )r=  namer   s   && r&   check_dimensionsrD    s    *ekk**??Q !A!H!H!NOO 	J	/	/jnnQ'88*..+//2ENNCC6==dC$S)) D 9 
0r%   c                     \         P                  ! V 4      '       g   \        R 4      hV \        V 4      ,
          ^ 8w  d   \        R4      hR# )z)Cannot convert non-finite ddof to integerzddof must be integral valueN)re   r  r   r  )r%  s   &r&   _handle_ddofrF  %  s?    ;;tDEEc$i1677 r%   c                     V # r+   r$   r  s   &r&   r  r  -  s    ar%   c                 :    V! V 4       V! V4       \        WW#4      # r+   )r)  )r   r!  r-  r   r%  _DDOF_HANDLER_M_DIM_HANDLERs   &&&&&&&r&   _prepare_cov_inputrK  0  s!     1$#A&88r%   c                 *   VR \         P                  39   p\        V \         P                  4      '       d   V P                  ^8X  d   V# \        V \         P
                  4      '       d   \        ;QJ d&    R V P                    4       F  '       d   K   RM	  RM! R V P                    4       4      '       d   V# \        V P                   4      ^8X  d4   \        V P                   ^ ,          \         P
                  4      '       d   V# \        V \         P                  \         P                  34      '       d   V# \        V \         P                  4      '       d<   \        V P                  ^ ,          \         P                  4      '       g   V'       d   R# R# )Nc              3   v   "   T F/  p\        V\        P                  \        P                  34      x  K1  	  R # 5ir+   )rW   r   r   r   ).0r  s   & r&   	<genexpr>)scalar_result_expected.<locals>.<genexpr>?  s.      /-1 !ellEMM:;;-s   79FT)r   r  rW   r   r   	BaseTuplery  rF   r   r   r+  r  )mandatory_inputoptional_inputopt_is_nones   && r&   scalar_result_expectedrU  8  s    T5::$66K/5;;//O4H4HA4M/5??333 /'--/333 /'--/ / /O))*a/44Q7II""/ELL%--#@AA/5>>22?..q15>>BBr%   c                     \         P                  ! \         P                  ! V 4      ^8  \         P                  ! V 4      V 4      # r  )re   rJ  fabssignr  s   &r&   
_clip_corrrY  R  s)    88BGGAJNBGGAJ22r%   c                 v    \        V P                  4      p\        V P                  4      pVR V,          ,           # )r  )rY  r   r  )r  r   r  s   &  r&   _clip_complexr[  W  s-    affDaffD"t)r%   c                 f  a	a
a \        V R 4       \        VR4       VR\        P                  39   d   \        o	Mi\	        V\        P
                  \        P                  34      '       d   \        o	M2\	        V\        P                  4      '       d   \        o	M\        R4      h\        o
\	        V \        P                  4      '       d   \        o
\        V 4      p\        V4      p\        P                  ! WV\        P                   4      oRV	V
V3R llpRV	V
V3R llp\#        W4      '       d   V# V# )r   r!  Nz)ddof must be a real numerical scalar typec           	      j  < \        WVSVSS4      P                  S4      p\        P                  ! \        P                  ! VP
                  4      ^ 8H  4      '       dL   \        P                  ! VP
                  ^ ,          VP
                  ^ ,          3\        P                  SR7      # \        WSV4      # )rb   r  )	rK  r  re   r  r  r   r   r  r'  )	r   r!  r-  r$  r%  r#  rI  rJ  r   s	   &&&&& r&   np_cov_implnp_cov.<locals>.np_cov_impl}  s    qVUD--//5ve} 	
 66"((177#q())77AGGAJ
3!&( ( %Qd33r%   c           	      B  < \        WW$S	SS4      P                  S	4      p\        P                  ! \        P                  ! VP
                  4      ^ 8H  4      '       d   \        P                  pM\        WSV4      P                  ^ ,          p\        P                  ! V4      # r   )	rK  r  re   r  r  r   r  r'  r   )
r   r!  r-  r$  r%  r#  variancerI  rJ  r   s
   &&&&&  r&   np_cov_impl_single_variable+np_cov.<locals>.np_cov_impl_single_variable  sv    qV5--//5ve} 	
 66"((177#q())vvH($7<<Q?Hxx!!r%   NTFN)rD  r   r  _handle_ddof_noprW   r   r   r   rF  r   _handle_m_dim_nopr   r8  r  re   r  r   rU  )r   r!  r-  r$  r%  m_dty_dtr^  rb  rI  rJ  r   s   &&&&&    @@@r&   np_covri  ^  s     QQ ejj!!(dU]]EMM:;;,Mekk**(MIJJ
 'N!U[[!!- 1D1DNN4rzz2E4 4
" 
" a##**r%   c                   a \        V 4      p\        V4      p\        P                  ! W4\        P                  4      pV\        P                  8X  d   \
        oM\        oRV3R llpRR lp\        W4      '       d   V# V# )Nc                 N  < \         P                  ! WV4      p\         P                  ! V4      p\         P                  ! VP                  4      p\        VP                  ^ ,          4       F0  pW6R3;;,          V,          uu&   VRV3;;,          V,          uu&   K2  	  S! V4      # )rb   r  )re   covdiagsqrtr   r2   r   )r  r!  r-  ri   r  stddevr-   clip_fns   &&&    r&   np_corrcoef_impl%np_corrcoef.<locals>.np_corrcoef_impl  sv    FF1 GGAJqwwqz"AdGvGadGvG # qzr%   c                 @    \         P                  ! WV4      pW3,          # r+   )re   rl  )r  r!  r-  ri   s   &&& r&    np_corrcoef_impl_single_variable5np_corrcoef.<locals>.np_corrcoef_impl_single_variable  s    FF1 ur%   NT)r  re   r  r   
complex128r[  rY  rU  )	r  r!  r-  r  rh  r   rq  rt  rp  s	   &&&     @r&   np_corrcoefrx    sf     1D1DNN4rzz2E	 a##//r%   c                    aa \        V \        P                  \        P                  34      p\	        V 4      '       d   V'       g   R  pV# RoRoVV3R lpV# )c                    \         P                  ! V 4      pVP                  R8X  d'   \         P                  ! R\        P
                  R7      # \         P                  ! \         P                  ! \         P                  ! V4      4      4      # )rb   r.  r$   )rb   r   )	re   r  r   r'  r   r4   rh  vstackrd  rq  s   & r&   rp  np_argwhere.<locals>.impl  sO    **Q-CyyBxxejj99<<		"**S/ :;;r%   c                    < V e8   \        V 4      '       d'   \        P                  ! S\        P                  R7      # \        P                  ! S\        P                  R7      # r  )r}  re   r'  r   r4   )r,   falseishtrueishs   &r&   rp  r|    s:    }axxuzz::xx

;;r%   )rb   rb   )r   rb   )rW   r   r   r   r	   )r,   
use_scalarrp  r~  r  s   &  @@r&   np_argwherer    sO    
 Aemm<=J:	< K 	< Kr%   c                 8    \        V 4      '       d   R  pV# R pV# )c                     \         P                  ! V 4      p\         P                  ! \         P                  ! V4      4      ^ ,          # r   )re   r  rd  ri  rq  s   & r&   rp  np_flatnonzero.<locals>.impl  s+    **Q-C::bhhsm,Q//r%   c                     V e   \        V 4      '       d   ^ .pM\        ^ 4       Uu. uF  q"NK  	  pp\        P                  ! V\        P
                  R7      # u upi r  )r}  r2   re   r  r   r4   )r,   r@   r  s   &  r&   rp  r    sH    }as#(8,8a8,88D

33 -s   
Ar  )r,   rp  s   & r&   np_flatnonzeror    s'     	0 K	4 Kr%   c                    V P                   ^8X  dY   V P                  ^ ,          pV P                  ^,          p^V,           pV'       d   W2,          pWT3# V\        W#4      ,          p WT3# \        P                  ! V P                  4      p\        P
                  ! \        P                  ! V4      ^ 8H  4      '       g   \        R4      h^\        P                  ! VRR 4      P                  4       ,           pVP                  4       pWT3# )r(  z/All dimensions of input must be of equal lengthNrg  )r   r   r  re   r  ry  r  r   r   r  r   )r,   wrapr   r  stepr  r   s   &&     r&   _fill_diagonal_paramsr    s    vv{GGAJGGAJ1u%C 9 c!i-C 9 !vvbggen)**NOOBJJuSbz*//11jjl9r%   c                 b    \        W4      w  r4\        ^ W44       F  pWP                  V&   K  	  R# rh  )r  r2   r   )r,   r   r  r  r  r-   s   &&&   r&   _fill_diagonal_scalarr    s*    %a.IC1c q	 !r%   c                     \        W4      w  r4^ p\        V4      p\        ^ W44       F)  pW,          V P                  V&   V^,          pWV,          pK+  	  R# rh  )r  rF   r2   r   )r,   r   r  r  r  ctrv_lenr-   s   &&&     r&   _fill_diagonalr    sL    %a.IC
CHE1c Hq	qk !r%   c                 f   \         P                  ! V P                  4      pVP                  pVP                  p\         P
                  ! \         P                  ! V4      ( 4      '       g=   \         P
                  ! W8  4      '       g   \         P
                  ! W8  4      '       d   \        R 4      hR# z'Unable to safely conform val to a.dtypeN)re   iinfor   r  r3  r  r  r   )r,   r   r  v_minv_maxs   &&   r&   _check_val_intr    su    HHQWWEIIEIIE 
vvr{{3  BFF3;$7$7266#+;N;NBCC <Or%   c                 >   \         P                  ! V P                  4      pVP                  pVP                  pV\         P
                  ! V4      ,          p\         P                  ! WS8  4      '       g   \         P                  ! WT8  4      '       d   \        R 4      hR# r  )re   finfor   r  r3  r  r  r   )r,   r   r  r  r  finite_valss   &&    r&   _check_val_floatr    sp    HHQWWEIIEIIE bkk#&'K	vvk!""bff[-@&A&ABCC 'Br%   c                     V # r+   r$   r  r!  s   &&r&   r  r  +  s    1r%   c                     R # r+   r$   r  s   &r&   rp  rp  .  r}  r%   c                 6  a \        V \        P                  4      '       d   R  # \        V \        P                  \        P                  34      '       d   R # \        V \        P
                  \        P                  34      '       d   \        V 4      oV3R l# R# )c                     V # r+   r$   r  s   &r&   r  _asarray_impl.<locals>.<lambda>5  s    r%   c                 .    \         P                  ! V 4      # r+   r  r  s   &r&   r  r  7  s    !r%   c                 6   < \         P                  ! V .SR 7      # r-  r  r  r@  s   &r&   r  r  :  s    1#R0r%   N)rW   r   r   r+  rZ   r   r   r   r  s   &@r&   _asarray_implr  2  sh    !U[[!!	A4	5	5$$	Aemm4	5	5a[00 
6r%   c                 Z  a V P                   ^8  d   \        V P                  \        P                  4      '       d   \
        oM7\        V P                  \        P                  4      '       d   \        oM\        oRV3R llpRV3R llp\        V\        P                  \        P                  \        P                  34      '       d   V# \        V\        P                  \        P                  \        P                  34      '       d   V# R# RV P                   ,          p\        V4      h)r   c                 b   < \        V4      P                  4       pS! W4       \        WV4       R # r+   )rp  r  r  r,   r   r  tmpvalcheckers   &&& r&   scalar_impl%np_fill_diagonal.<locals>.scalar_implK  s'    c]**,FA!!$/r%   c                 b   < \        V4      P                  4       pS! W4       \        WV4       R # r+   )rp  r  r  r  s   &&& r&   non_scalar_impl)np_fill_diagonal.<locals>.non_scalar_implP  s'    c]**,FA1d+r%   z4The first argument must be at least 2-D (found %s-D)Nr  )r   rW   r   r   r   r  r   r  
_check_nopr   rZ   r+  r   r   )r,   r   r  r  r  r   r  s   &&&   @r&   np_fill_diagonalr  =  s     	vvz aggu}}--$G--&G G	0
	,
 cEKKFGGekk5>>5;;GHH"" I EqvvM#r%   c                 *    R V P                   3,          # )zllvm.rint.f%d)r   )tps   &r&   _np_round_intrinsicr  ^  s    bkk^++r%   c                     V! V4      pR  pW#3# )c                 <   Vw  pVP                   ^ ,          pV P                  V4      pVP                  p\        P                  P                  Wf.4      p\        P                  ! Wx\        V4      4      p	VP                  W34      p
\        WVP                  V
4      # r   )r:   r0   modulellvmliteirFunctionTyper   get_or_insert_functionr  callr   rs   )rv   r8   rw   r:   r   r  lltyr  fntyr  rx   s   &&&&       r&   rD    _np_round_float.<locals>.codegeng  s    XXa[%%b){{''f5++F,?,CEll2v&!'COOSIIr%   r$   )	typingctxr   rw   rD   s   &&  r&   _np_round_floatr  c  s    
c(C	J <r%   c                    \         P                  ! V 4      '       g   \         P                  ! V 4      '       d   V # V^ 8  dl   V^8  d   RV^,
          ,          pRpMRV,          pRpW,          V,          p\         P                  ! V4      '       d   V # \        V4      V,          V,          # RV) ,          pW,          p\        V4      V,          # )rb   g      $@gMDr  )r  r  r0  r  )r  ndigitspow1pow2r!  s   &&   r&   round_ndigitsr  u  s    zz!}}

1 !|R< GbL)DD7?DDX::a==H"T)T11 !Hq!D((r%   c                    \        V 4      '       g   \        R 4      h\        V\        P                  4      '       g   \        V4      '       g   Rp\        V4      h\        V \        P                  \        P                  \        P                  34      '       d   \        V4      '       dx   \        V \        P                  4      '       d   R	R lpV# \        V \        P                  4      '       d   R	R lpV# \        V \        P                  4      '       d   R	R lpV# R# R	R lpV# \        V \        P                  4      '       d    \        V4      '       d   R	R lpV# R	R lpV# R# )
z#The argument "a" must be array-likez5The argument "out" must be an array if it is providedNc                 <    V^ 8X  d   \        V 4      # \        W4      # r   )r  r  r,   decimalsr   s   &&&r&   rp  impl_np_round.<locals>.impl  s    1}.q11,Q99r%   c                 <    V^ 8X  d   V # \        \        W4      4      # r   )r  r  r  s   &&&r&   rp  r    s    1} "=#=>>r%   c                     V^ 8X  d,   \        V P                  4      p\        V P                  4      pM,\        V P                  V4      p\        V P                  V4      p\	        W44      # r   )r  r   r  r  complex)r,   r  r   r   r  s   &&&  r&   rp  r    sP    1}.qvv6.qvv6,QVVX>,QVVX>"4..r%   c                 8    \         P                  ! W4      V^ &   V# r   )re   roundr  s   &&&r&   rp  r    s    !.A
r%   c                 \    \         P                  ! V 4      p\         P                  ! WV4      # r+   )re   r  r  r  s   &&&r&   rp  r    s!    mmA&xxS11r%   c                     V P                   VP                   8w  d   \        R 4      h\        P                  ! V 4       F  w  r4\        P                  ! WA4      W#&   K  	  V# )zinvalid output shape)r   r   re   r  r  )r,   r  r   r  r   s   &&&  r&   rp  r    sH    77cii'$%;<<"$.."3JE!##!8CJ #4
r%   rh  )	r	   r   rW   r   r   r   r   r   r   )r,   r  r   r   rp  s   &&&  r&   impl_np_roundr    s    A?@@sEKK((K,<,<E#!ekk5==%--@AAs!U[[)):
 Au}}--?
 Au}}--/  . K	Au{{	#	#s2 K K 
$r%   c                     \        V \        P                  4      '       d   R  pV# \        V \        P                  4      '       d   R pV# \	        R4      h)c                 |    V R 8X  d   Rp V \         P                  ,          p \         P                  ! V 4      V ,          # )r   g#B;)re   pisinr  s   &r&   rp  impl_np_sinc.<locals>.impl  s-    DyJA66!9q= r%   c                     \         P                  ! V 4      p\         P                  ! V 4       F  w  r#\         P                  ! V4      W&   K  	  V# r+   )re   rK  r  sinc)r  r   r  r   s   &   r&   rp  r    s9    --"C nnQ/
WWS\
 0Jr%   z,Argument "x" must be a Number or array-like.)rW   r   r   r   r   r  s   & r&   impl_np_sincr    sH    !U\\""	!
 	Au{{	#	#	
 KLLr%   c                   aa \        ^\        P                  ,          4      o\        V \        P
                  4      '       d   RV3R llpV# \        V \        P                  4      '       di   V P                  p\        V\        P                  4      '       d   VP                  oM%\        V\        P                  4      '       d   VoMR# RV3R llpV# \        RV  24      h)   c                    < V'       d3   \         P                  ! V P                  V P                  4      S,          # \         P                  ! V P                  V P                  4      # r+   )re   arctan2r  r   )rZ  degdeg_mults   &&r&   rp  ov_np_angle.<locals>.impl  s=    zz!&&!&&1H<<zz!&&!&&11r%   Nc                    < \         P                  ! V SR 7      p\         P                  ! V 4       F  w  r4\         P                  ! WA4      W#&   K  	  V# r-  )re   rK  r  angle)rZ  r  r   r  r   	ret_dtypes   &&   r&   rp  r    s=    --3C nnQ/
XXc/
 0Jr%   z6Argument "z" must be a complex or Array[complex]. Got r  )r  re   r  rW   r   r   r   r   r   underlying_floatr   r   )rZ  r  rp  r   r  r  s   &&  @@r&   ov_np_angler    s    S255[!H !U\\""	2
 	Au{{	#	#eU]]++..Iu{{++I	
  778c; < 	<r%   zarray.nonzeroc                    VP                   ^ ,          pVP                  pVP                  pVP                  p\	        V4      ! WV^ ,          4      p\
        P                  ! WP                  4      p	\
        P                  ! WP                  4      p
VP                  pVP                  pV P                  \        P                  ^ 4      pV P                  \        P                  ^4      p\
        P                  ! W4      p\
        P                  ! WVP                   4      ;_uu_ 4       p\
        P"                  ! WWV
VV4      p\%        WVV4      pV P'                  WP                  V4      pVP)                  V4      ;_uu_ 4        VP+                  VP-                  VP/                  V4      V4      V4       RRR4       RRR4       VP/                  V4      3p\1        V4       Uu. uF  p\3        WVV4      P5                  4       NK   	  ppV Uu. uF  p\	        V4      ! WV4      NK  	  ppV Uu. uF  pVP                  NK  	  pp\
        P                  ! W4      p\
        P                  ! WVP                   4      ;_uu_ 4       p\
        P"                  ! WWV
VV4      p\%        WVV4      pV P'                  WP                  V4      pVP)                  V4      ;_uu_ 4        V'       g   V3pVP/                  V4      p\1        V4       F;  p\
        P"                  ! WVV,          VRRV.4      p\7        WVVV,          V4       K=  	  VP+                  VP-                  VV4      V4       RRR4       RRR4       V P9                  WP                  V4      p\;        WVP                  V4      #   + '       g   i     EL; i  + '       g   i     EL; iu upi u upi u upi   + '       g   i     L; i  + '       g   i     L; i)rb   NCr$   )r:   rs   r   rB  r   r   unpack_tupler   stridesr@   layoutr3   r   r4   alloca_once_value	loop_nestr   get_item_pointer2r   is_trueif_thenstorer<  loadr2   r   	_getvaluer   
make_tupler   )rv   r8   rw   r:   arytyr   outarytynoutsr  r   r  r@   r  rk   r[  rB  indicesptrr   nz	out_shaper-   outsr   outarys	out_datasr  curr<   s   &&&&                         r&   array_nonzeror     s$    HHQKEOOE{{HKKE
U
Gd1g
6C  ))4E""7KK8G88D\\F 

A.D


uzz1
-C%%g4E			7499	5	5''$w(.9%5__Wkk37__R  MM'++gll5&93?G ! 
6 e$&I5\#! 7XyAKKM! 	 #FJKdsz(#Gc:dGK%,-WcWI- %%g4E			7499	5	5''$w(.9%5__Wkk37__R  ',,u%C5\//)A,09203cU< 7Xwqz3G	 "
 MM'++c3/7 ! 
6$ 

Woot
<CGcoosCC? !   
6	5	5#K- !  
6	5s]   (AO2N0	7O&$OO1O"AO:$B	O'	-O:0O;	OO	'O72O::P
	c                    a  V 3R  lpV# )c                    < \         P                  ! V4      P                  S4      p\         P                  ! V4      P                  S4      pV '       d   V# T# r+   )re   r  r  )	conditionr  r!  x_y_r   s   &&&  r&   rp  )_where_zero_size_array_impl.<locals>.impl=  s@    ZZ]!!%(ZZ]!!%(r&B&r%   r$   )r   rp  s   f r&   _where_zero_size_array_implr  <  s    ' Kr%   c                 x    \         P                  ! V 4       F  w  rEV'       d	   W,          MW$,          W4&   K!  	  V# r+   )re   r  )condr  r!  rx   r   ri   s   &&&&  r&   _where_generic_inner_implr
  D  s+    ..&16AF 'Jr%   c                     V P                   pVP                   pVP                   pVP                   p\        V P                  4       F#  pWH,          '       d	   WX,          MWh,          Wx&   K%  	  V# r+   )r   r2   r   )	r	  r  r!  rx   cfxfyfrfr-   s	   &&&&     r&   _where_fast_inner_implr  K  sQ    	B	
B	
B	B499BE Jr%   c                 .   a aa SR 0R039   oV VV3R lpV# )r  Fc                 N  < \         P                  ! V 4      \         P                  ! V4      \         P                  ! V4      rTp\         P                  ! VP                  VP                  VP                  4      p\         P                  ! W64      p\         P                  ! WF4      p\         P                  ! WV4      p	SR 8X  d.   \         P
                  ! VRRR1,          SR7      P                  p
M\         P
                  ! VSR7      p
S'       d   \        WxW4      # \        WxW4      # )r  Nr.  rg  )	re   r  r/  r   r0  r   r"  r  r
  )r  r  r!  cond1x1y1r   cond_r  r  rx   r   r  use_faster_impls   &&&        r&   rp  !_where_generic_impl.<locals>.implY  s    

9-rzz!}bjjm2##EKK288D-__R'__R'S=((52;e466C((5.C)%R==,U@@r%   r$   )r   r  rp  r  s   ff @r&   _where_generic_implr  V  s"    #.OA" Kr%   c                 H    \        V 4      '       g   R p\        V4      hR pV# )+The argument "condition" must be array-likec                 J    \         P                  ! V 4      P                  4       # r+   )re   r  rd  )r  s   &r&   where_cond_none_none)ov_np_where.<locals>.where_cond_none_nones  s    zz)$,,..r%   )r	   r   )r  r   r  s   &  r&   ov_np_wherer   m  s(    I&&;S!!/r%   c                 r   \        V 4      '       g   R p\        V4      h\        V4      '       g   \        V4      '       d   \        R4      h\        W3R4       F2  w  rE\        V4      '       d   K  Rp\        VP	                  V4      4      h	  \        V \        P                  4      p\        V\        P                  4      p\        V\        P                  4      pV'       d   \        V4      p	\        V4      p
\        P                  ! W4      pR p\        WV3 Uu. uF
  q! V4      NK  	  up4      pV'       d   \        V4      # V P                  pV'       dH   V'       d@   VP                  VP                  u;8X  d   V P                  8X  d   M MVP                  pMRp\        W4      # R pV# u upi )r  z"Argument "x" or "y" cannot be Nonez0The argument "{}" must be array-like if providedc                     \        V \        P                  4      ;'       g2    \        V \        P                  4      ;'       d    V P                  ^ 8H  # r   )rW   r   r   r   r   )args   &r&   check_0_dim$ov_np_where_x_y.<locals>.check_0_dim  s@    c5<<0 @ @3,>>Q@r%   r  c                     \         P                  ! \         P                  ! V 4      \         P                  ! V4      \         P                  ! V4      4      # r+   )re   rJ  r  )r  r  r!  s   &&&r&   rp  ov_np_where_x_y.<locals>.impl  s.    88BJJy12::a="**Q-PPr%   r  )r	   r   r   ziprB  rW   r   r   r  re   r  ry  r  r  r  )r  r  r!  r   r#  rC  cond_arrr  r1  r  rh  r   r$  r,   special_0_caser  rp  s   &&&              r&   ov_np_where_x_yr+  x  s]   I&&;S!! 1~~QABB!,	$$DC D!122 -
 )U[[1Hq%++&Eq%++&Eq!q!  ,	@ yQ6GH6Gk!n6GHI.u55!!Uxx1887y'7'77"511	Q Is   F4c                     R  pV# )c                     V P                   # r+   )r   r  s   &r&   np_real_implnp_real.<locals>.np_real_impl      xxr%   r$   )r   r.  s   & r&   np_realr1         r%   c                     R  pV# )c                     V P                   # r+   )r  r  s   &r&   np_imag_implnp_imag.<locals>.np_imag_impl  r0  r%   r$   )r   r5  s   & r&   np_imagr7    r2  r%   c                 P    \        V \        P                  4      '       g   R # R pV# )Nc                 R    \         P                  ! V 4       F  pW!8X  g   K   R # 	  R# r  )re   rf   )rh   r  r  s   && r&   np_contains_impl%np_contains.<locals>.np_contains_impl  s!    3Ax   r%   r  )rh   r  r:  s   && r&   np_containsr<    s#    c5;;'' r%   c                 x    \        V 4      '       g   \        R 4      h\        V4      '       d   RR lpV# RR lpV# )z3The argument to np.count_nonzero must be array-likec                 `    \         P                  ! V 4      p\         P                  ! V^ 8g  4      # r   )re   ri  r  r,   r\   arr2s   && r&   rp  np_count_nonzero.<locals>.impl  s"    88A;D66$!)$$r%   c                 n    V P                  \        P                  4      p\        P                  ! W!R 7      # ))r\   )r  re   r   r  r?  s   && r&   rp  rA    s#    88BHH%D66$**r%   r+   )r	   r   r   )r,   r\   rp  s   && r&   np_count_nonzerorC    s<    AOPP4	% 	+ r%   c                     V # r+   r$   r  s   &r&   r  r    s    r%   c                 .    \         P                  ! V 4      # r+   r  r  s   &r&   r  r    s    

1r%   c                 ,  a \        V \        P                  \        P                  34      '       g   \	        R 4      h\        V\        P                  \        P                  \        P
                  34      '       dk   \        V\        P
                  4      '       d   \        oM;\        VP                  \        P                  4      '       g   \	        R4      h\        oV3R lpV# \        V\        P                  4      '       g   \	        R4      hR pV# )z)arr must be either an Array or a Sequencezobj should be of Integer dtypec                    < \         P                  ! \         P                  ! V 4      4      p V P                  p\         P                  ! V\         P
                  R 7      pS! V4      pRW1&   W,          # )r.  F)re   ri  r  r   onesr   )rh   r  r6  keephandlers   &&  r&   np_delete_impl!np_delete.<locals>.np_delete_impl  sN    ((2::c?+CA771BHH-D#,CDI9r%   c                    \         P                  ! \         P                  ! V 4      4      p V P                  pTpW2) 8  g   W28  d   \	        R 4      hV^ 8  d	   W2,          p\         P
                  ! V RV W^,           R 34      # )z"obj must be less than the len(arr)N)re   ri  r  r   
IndexErrorconcatenate)rh   r  r6  poss   &&  r&   np_delete_scalar_impl(np_delete.<locals>.np_delete_scalar_impl  so    ((2::c?+CACbCH !EFF a>>3t9c'(m"<==r%   )
rW   r   r   r+  r   	SliceTypenp_delete_handler_isslicer   r   np_delete_handler_isarray)rh   r  rK  rQ  rJ  s   &&  @r&   	np_deleterV    s    
 cEKK899EFF#U^^U__EFFcEOO--/Gcii77!"BCC/G	  #u}}-->??	> %$r%   c                 v    \        V \        P                  4      '       d   V P                  ^ 8X  d   R# RR lpV# )rb   Nc                 V   V^ 8X  d   V P                  4       # V^ 8  d   \        R4      hV P                  R,          pV P                  RR \        W!,
          ^ 4      3,           p\        P
                  ! W0P                  4      pVP                  ^ 8X  d   V# V P                  RV34      pVP                  RVP                  R,          34      p\        P
                  ! W P                  4      p\        VP                  ^ ,          4       F  p\        V^,
          4       F%  p	WXV	^,           3,          WXV	3,          ,
          Wy&   K'  	  \        ^V4       F@  p
\        W*,
          ^,
          4       F!  p	Wy^,           ,          Wy,          ,
          Wy&   K#  	  KB  	  VRW!,
           Wh&   K  	  V# )rb   z"diff(): order must be non-negativeNrg  )
r  r   r   r3  re   r   r   r   rj  r2   )r,   r  r   r  r   a2out2workmajorr-   niters   &&         r&   	diff_implnp_diff_impl.<locals>.diff_impl  sQ   6668Oq5ABBwwr{GGCRLC!$4#66	hhy''*88q=J YYDz"{{B		"./xxgg&288A;'E4!8_AE\*Rq\9 % q!t|a/0A"q5kDG3DG 1 % y/DK ( 
r%   r  )rW   r   r   r   )r,   r  r^  s   && r&   np_diff_implr`    s-    a%%1> r%   c                     \        V 4      '       d   \        V4      '       g   \        R 4      h\        P                  \        P                  3p\        W4      '       d   \        W4      '       d   R pV# R pV# )z3Both arguments to "array_equals" must be array-likec                 
    W8H  # r+   r$   )a1rY  s   &&r&   rp  np_array_equal.<locals>.implC  s	    8Or%   c                     \         P                  ! V 4      p\         P                  ! V4      pVP                  VP                  8X  d   \         P                  ! W#8H  4      # R # r  )re   r  r   ry  )rc  rY  r,   r  s   &&  r&   rp  rd  F  s?    

2A

2Aww!''!vvaf~%r%   )r	   r   r   r   r   rW   )rc  rY  acceptedrp  s   &&  r&   np_array_equalrg  :  se     R  %5b%9%9OPPu||,H"Jr$<$<	 K	 Kr%   c                     \        V 4      '       g   \        V4      '       g   \        R 4      h\        V\        P                  \
        34      '       g   \        R4      hRR lpV# )z.intersect1d: first two args must be array-likez5intersect1d: argument "assume_unique" must be booleanc                    \         P                  ! V 4      p \         P                  ! V4      pV'       g.   \         P                  ! V 4      p \         P                  ! V4      pM V P                  4       p VP                  4       p\         P                  ! W34      pVP                  4        VR ,          VRR 8H  pVRR V,          pV# )r  Nrg  )re   r  r  ri  rO  sort)ar1ar2assume_uniqueauxrM  int1ds   &&&   r&   np_intersects1d_impl0jit_np_intersect1d.<locals>.np_intersects1d_impl[  s    jjojjo))C.C))C.C))+C))+CnncZ(
2w#cr("CRr%   r  r	   r   rW   r   r   r}  )rk  rl  rm  rp  s   &&& r&   jit_np_intersect1drs  P  s^    
 S!!%5c%:%:JKKmemmT%:;; E F 	F   r%   c                    \        V\        P                  4      '       d.   VP                  ^8w  d   \	        RP                  V 4      4      hR# \        V\        P                  4      '       g   \	        RP                  V 4      4      hR# )r   z${0}(): input should have dimension 1z+{0}(): input should be an array or sequenceN)rW   r   r   r   r   rB  r+  )	func_nameseqs   &&r&   validate_1d_array_likerw  n  so    #u{{##88q= !G"(&"35 5  U^^,,J$fY/1 	1 -r%   c                   aaa \        R V 4       \        V P                  \        P                  4      '       g   R# \        VR4       VR\        P                  39  d6   \        R V4       \        P                  o\        R 4       o\        R 4       oM(\        P                  o\        R 4       o\        R 4       oRVVV3R llpV# )	bincountN	minlengthc                 N    \        V 4      \        V4      8w  d   \        R 4      hR# )z7bincount(): weights and list don't have the same lengthN)rF   r   r,   r  rz  s   &&&r&   validate_inputs$np_bincount.<locals>.validate_inputs  s)    1vW%  "3 4 4 &r%   c                 :    W;;,          W1,          ,          uu&   R # r+   r$   r   r   r   r  s   &&&&r&   
count_itemnp_bincount.<locals>.count_item  s    H$Hr%   c                     R # r+   r$   r|  s   &&&r&   r}  r~    s    r%   c                 .    W;;,          ^,          uu&   R# )r   Nr$   r  s   &&&&r&   r  r    s    HMHr%   c                   < S
! WV4       V^ 8  d   \        R4      h\        V 4      pV^ 8  d
   V ^ ,          MRp\        ^V4       F-  pW,          ^ 8  d   \        R4      h\        W@V,          4      pK/  	  \        V^,           V4      p\        P
                  ! VS	4      p\        V4       F  pS! WuW,          V4       K  	  V# )rb   z 'minlength' must not be negativez/bincount(): first argument must be non-negativerg  )r   rF   r2   r3  re   r'  )r,   r  rz  r  r  r-   
out_lengthr   r  r  r}  s   &&&     r&   bincount_impl"np_bincount.<locals>.bincount_impl  s    I.q=?@@FA!2q!Atax  "0 1 1t$E	  I.
hhz9-qAsqtW- 
r%   r>  )rw  rW   r   r   r   r   r  re   r   r   r4   )r,   r  rz  r  r  r  r}  s   &&& @@@r&   np_bincountr  x  s    :q)aggu}}--Y,tUZZ((z73 JJ			4 
	4
 
	% 
	% JJ			 
	 
	 
	 & r%   c                    \         P                  ! V P                  4      '       d   \         P                  ! VP                  4      '       d   \         P                  ! V P                  4      '       d!   \         P                  ! VP                  4      # \         P                  ! VP                  4      '       d   R # V P                  VP                  8*  # R# \         P                  ! VP                  4      '       d   R # \         P                  ! V P                  4      '       dB   \         P                  ! VP                  4      '       d   V P                  VP                  8*  # R# \         P                  ! VP                  4      '       d   R # V P                  VP                  8  d   R # V P                  VP                  8X  d   V P                  VP                  8*  # R# r  )re   r0  r   r  r  s   &&r&   less_than_or_equal_complexr    s   	xx88AFFxxxx''88AFF##66QVV++ 88AFFxx88AFF##66QVV++ 88AFF##vv#166) vv// r%   c                    \        V \        4      '       g   \        V\        4      '       d   \        W4      # \        V\        \        P
                  \        P                  34      '       d   \        P                  ! V4      '       d   R # W8*  # )T)	rW   r  r  r  r   float32r   re   r0  r  s   &&r&   _less_than_or_equalr    sY    !WAw!7!7)!//	Au}}emm<	=	=88A;;6Mr%   c                     \        V \        4      '       g   \        V\        4      '       d   \        W4      # \        V\        \        P
                  \        P                  34      '       d   \        W4      # W8  # r+   )rW   r  less_than_complexr  r   r  r   less_than_floatr  s   &&r&   
_less_thanr    sT    !WAw!7!7 &&	Au}}emm<	=	=q$$5Lr%   c                     \         P                  ! V 4      '       d   ^ # \         P                  ! V4      '       d   ^# W8  # r   )re   r/  r  s   &&r&   _less_then_datetime64r    s+     
xx{{	xx{{5Lr%   c                 "    \        W4      '       * # r+   )r  r  s   &&r&   _less_then_or_equal_datetime64r    s    $Q***r%   c                    a  V 3R  lpV# )c                    < W#8  d<   W#V,
          ^,	          ,           pW,          pS! WQ4      '       d   V^,           pK=  TpKA  W#3# r  r$   )r,   key_valrE  r^  r  mid_valcmps   &&&&  r&   rp  _searchsorted.<locals>.impl  sD    G"3!9:GjG7$$!A+!r%   r$   )r  rp  s   f r&   _searchsortedr    s    	  Kr%   leftrightc                 h   V\         9   g   Q hV P                  R 9   d   \        p\        pM\        p\
        pVR8X  d   \        V4      pTpMQ\        P                  ! V \        P                  4      '       d   \        R8  d   \        V4      pTpM\        V4      pTp\        V4      \        V4      3# )r  r  )r      )VALID_SEARCHSORTED_SIDESr  r  r  r  r  r  re   r  inexactr   r   )np_dtypesider  le_impl_cmps   &&    r&    make_searchsorted_implementationr    s    ++++}}"+ v~b!==2::..=73J ""%ED!"%EDE"$4T$:::r%   c                   aa \        VR V4      pV\        9  d   \        RV 24      h\        V\        P
                  \        P                  34      '       d   \        VP                  4      pM\        V4      p\        P                  ! \        V P                  4      V4      p\        WS4      w  oo\        V\        P
                  4      '       d   RVV3R llpV# \        V\        P                  4      '       d   RR lpV# RV3R llpV# )rY   z Invalid value given for 'side': c                   < \         P                  ! VP                  \         P                  R 7      pVP                  ^ ,          p^ p\        V 4      p\        VP                  4       Fh  pVP                  V,          pS	! WH4      '       d   \        V 4      pM'^ pV\        V 4      8  d   V^,          pM\        V 4      pTpS
! WWV4      w  rVWSV&   Kj  	  VP                  VP                  4      # r-  )	re   r   r   r4   r   rF   r2   rj  r   )r,   rj   r  r   last_key_valrE  r^  r-   r  r  r  s   &&&      r&   rp  searchsorted.<locals>.implD  s    ((1661C66!9LG!fG166]&&)..!!fGGQ'1"%a&&#(W#F  A #  ;;qww''r%   c                 ^    \         P                  ! V4      p\         P                  ! WVR 7      # )r  )re   r  searchsorted)r,   rj   r  s   &&&r&   rp  r  \  s     

1A??1d33r%   c                 2   < S! W^ \        V 4      4      w  r4V# r   )rF   )r,   rj   r  rr>   r  s   &&&  r&   rp  r  `  s    q#a&)DAHr%   r  )r   r  r   rW   r   r   r+  r   r   re   r  r  )	r,   rj   r  side_valv_dtnp_dtrp  r  r  s	   &&&    @@r&   r  r  2  s    t_d3H//  @
KLL!ekk5>>233 {Xagg.5E25CKE4!U[[!!	( 	(> K 
Au~~	&	&	4 K	 Kr%   c                    a \        V \        P                  4      '       d+   V P                  \        P                  9   d   \        R 4      h\        R 4       oRV3R llpV# )zx may not be complexc                    \        V 4      ^ 8X  d   ^# V ^ ,          p^pV\        V 4      8  d   W,          V8X  d   V^,          pK(  V\        V 4      8X  d   ^# W,          pW8  d9   \        V^,           \        V 4      4       F  pTpW,          pW8  g   K   ^ # 	  ^# \        V^,           \        V 4      4       F  pTpW,          pW8  g   K   ^ # 	  R# r  )rF   r2   )bins
last_valuer-   
next_values   &   r&   _monotonicity"np_digitize.<locals>._monotonicityl  s     t9> !W
#d)m: 5FA D	>W
"1q5#d),'
!W
*	 -
  1q5#d),'
!W
*	 -
 Ir%   c                   < S! V4      pV^ 8X  d   \        R4      hV'       dS   VR8X  d4   \        V4      \        P                  ! VRRR1,          V RR7      ,
          # \        P                  ! WRR7      # VR8X  d4   \        V4      \        P                  ! VRRR1,          V RR7      ,
          # \        P                  ! WRR7      # )rb   z3bins must be monotonically increasing or decreasingNr  r  r  rg  )r   rF   re   r  )r  r  r  monor  s   &&& r&   digitize_impl"np_digitize.<locals>.digitize_impl  s    T"19E 
 rz4y2??4":qv#NNNtV<<rz4y2??4":qw#OOOtW==r%   r  )rW   r   r   r   complex_domainr   r   )r  r  r  r  r  s   &&& @r&   np_digitizer  f  sS     !U[[!!agg1E1E&E011" "H>. r%   c                    a \        V\        \        P                  34      '       d5   VR \        P                  39   d   \        R4      oRV3R llpV# RR lp V# RR lpV# )Nr  c                    < SpS) p\         P                  ! V 4       F%  pVP                  4       pW68  d   TpWF8  g   K#  TpK'  	  \         P                  ! WW434      # r+   )re   rf   rg   	histogram)r,   r  r2   bin_minbin_maxr   rj   r  s   &&&    r&   histogram_impl$np_histogram.<locals>.histogram_impl  sV    $IIaLD		A{"#{"# ) ||Ag-?@@r%   c                 P   V^ 8:  d   \        R4      hVw  r4W48:  g   \        R4      h\        P                  ! V\        P                  4      pWC8  d   WV,
          ,          p\        P                  ! V 4       F  pVP                  4       p\        P                  ! W,
          V,          4      p	^ T	u;8:  d   V8  d$   M M V\        V	4      ;;,          ^,          uu&   Kh  W8X  g   Kp  WQ^,
          ;;,          ^,          uu&   K  	  \        P                  ! W4V^,           4      p
WZ3# )rb   z0histogram(): `bins` should be a positive integerz;histogram(): max must be larger than min in range parameter)
r   re   r'  r4   rf   rg   r  r  r  linspace)r,   r  r2   r  r  hist	bin_ratior   rj   r  
bins_arrays   &&&        r&   r  r    s    19$ &8 9 9#( )$ &> ? ? xxbgg.$ $'(9 :I "		! IIK JJy'@A=D= QLA-L\ Na/N !-  [[4!8D
''r%   c                 @   \        V4      ^,
          p\        V4       F(  pW,          W^,           ,          8:  d   K  \        R4      h	  V^ ,          pW,          p\        P                  ! V\        P
                  4      pV^ 8  d   \        P                  ! V 4       F|  pVP                  4       p	YYu;8:  d   V8:  g   M K%  ^ p
V^,
          pW8  d3   W,           ^,           ^,	          pWV,          8  d   V^,
          pK4  Tp
K8  Wz;;,          ^,          uu&   K~  	  Wq3# )r   z-histogram(): bins must increase monotonically)rF   _ranger   re   r'  r4   rf   rg   )r,   r  r2   nbinsr-   r  r  r  r   rj   lohir  s   &&&          r&   r  r    s    IMEE]w$1u+-$ &5 6 6 # 1gGkG88E277+DqyIIaLD		A"272 BB'  "w{q0Cy=!$qB!$BHMH! )$ :r%   
   N)rW   r  r   r   r  r  )r,   r  r2   r  r  s   &&& @r&   np_histogramr    sb    $emm,-- T5::&&,C	AN w(v C	B r%   MachArr  r  c            	      (  aa \         R	8  d   R# Ro\        P                  ! RR7      ;_uu_ 4       oRp \        P                  ! RV \        RR7       \
        P                  oRRR4       \        S4      VV3R l4       pR#   + '       g   i     L'; i)
r   NT)recordz(`np.MachAr` is deprecated \(NumPy 1.22\)alwaysz.*numba.*arraymath)messagecategoryr  c            	      8  <a S! 4       p \        \         Uu. uF  p\        W4      NK  	  up4      oS'       dV   S^ ,          p\        P                  ! VP
                  P                  ^ ,          \        VP                  VP                  4       V3R lpV# u upi )rb   c                     < \        S !  # r+   )r  )_mach_ar_datas   r&   rp  1_gen_np_machar.<locals>.MachAr_impl.<locals>.impl3  s    =))r%   )
rr  _mach_ar_supportedr   warningswarn_explicitr  r:   r   filenamelineno)r  r  wmsgrp  r  	np_MachArws       @r&   MachAr_impl#_gen_np_machar.<locals>.MachAr_impl'  sv    K6HI6Hwq}6HIJQ4D""4<<#4#4Q#7#:#'==#';;0
	* Js   B)r      )r   r  catch_warningsfilterwarningsDeprecationWarningre   r  r   )r   r  r  r  s     @@r&   _gen_np_macharr    su    A		 	 	-	-9#);'<	> II	 
. i  
.	-s   1BB	c           	         aa	 \        V R V 4      p\        V4      p V! V4      p\        T Uu. uF  p\        Yg4      NK  	  up4      o	\        TT	3R l4       pT#   \         d     R# i ; iu upi )r   Nc                    < S! S!  # r+   r$   )r#  	containerr@   s   &r&   rp  !generate_xinfo_body.<locals>.implE  s    $r%   )r   r   r   rr  r   )
r#  np_funcr  attrnbtyr  r  r  rp  r@   s
   &&f&     @r&   generate_xinfo_bodyr  ;  sw    3%D~HH .A'!-./D   K   /s   A A,A)(A)c                 \   a \        V \        P                  \        \        4      oV3R  lpV# )c                    < S! V 4      # r+   r$   )r   r  s   &r&   rp  ol_np_finfo.<locals>.implO  s    %yr%   )r  re   r  _finfo_supported)r   rp  r  s   & @r&   ol_np_finfor  K  s"    	UBHHe5E	FBKr%   c                 \   a \        V \        P                  \        \        4      oV3R  lpV# )c                    < S! V 4      # r+   r$   )int_typer  s   &r&   rp  ol_np_iinfo.<locals>.implX  s    (|r%   )r  re   r  _iinfo_supported)r   rp  r  s   & @r&   ol_np_iinfor  T  s"    	Xrxx8H	IBKr%   c                 0  a \         R  4       p\        '       g   V# \        P                  \        P                  ,          pW9   ;'       d    W9   pV'       g   V# \        V 4      p\        V4      p\        P                  ! WV4      o\         V3R l4       pV# )c                 x    ^ p\        \        V 4      4       F  pW V,          W,          ,          ,           pK!  	  V# r   r2   rF   )r,   r  accr-   s   &&  r&   
_innerprod#_get_inner_prod.<locals>._innerproda  s0    s1vA!qt#C 
r%   c                 n   < \         P                  ! V P                  S4      VP                  S4      4      # r+   )re   r!  r  )r,   r  r  s   &&r&   	_dot_wrap"_get_inner_prod.<locals>._dot_wrapu  s$    66!((2,55r%   )r   
_HAVE_BLASr   real_domainr  r   re   r  )	dtadtbr  fltyfloatsa_dtb_dtr  r  s	   &&      @r&   _get_inner_prodr  ]  s       :u333D[((S[F}}d)		6 
	6r%   c                     \        V \        P                  4      '       d&   V P                  ^8:  g   \	        RV,          4      hR# R# )r   z!%s() only supported on 1D arrays N)rW   r   r   r   r   )r,   ru  s   &&r&   
_assert_1dr  {  s9    !U[[!!vv{AIMNN  "r%   c                     R # r+   r$   )ap1ap2mode	directions   &&&&r&   _np_correlate_corer    r}  r%   c                    aa \        V P                  4      p\        VP                  4      p\        P                  ! WE4      o\	        V P                  VP                  4      oVV3R  lpV# )c                   < \        V 4      p\        V4      pWE8  d   \        R 4      hTpTpVR8X  d   Wg,
          ^,           p^ p^ p	MTVR8X  d#   V^,
          p	V^,
          pWg,           ^,
          pM+VR8X  d   V^,          pWx,
          ^,
          p	M\        R4      h\        P                  ! VS4      p
V^8X  d   ^ p^pMVR8X  d   V^,
          pRpM\        R4      h\	        V4       F+  pW,           V,
          pS! V RV W) R 4      W&   W,           pK-  	  \	        WE,
          ^,           4       F  pS! WW,            V4      W&   W,           pK   	  \	        V	4       F+  pW},
          ^,
          pS! W) R VRV 4      W&   W,           pK-  	  V
# )z''len(ap1)' must greater than 'len(ap2)'r  r   samez1Invalid 'mode', valid are 'full', 'same', 'valid'zInvalid directionNrg  )rF   r   re   r'  r2   )r  r  r  r  n1n2r  r  n_leftn_rightr  r   incr-   r  r  	innerprods   &&&&           r&   rp  %_np_correlate_core_impl.<locals>.impl  s    XX7 FGG7?Z!^FFGV^!eGUFZ!^FV^!VFj1nG4 
 hhvr">CC"_1*CC011vAA Ra#bc(3CH)C 
 rw{#A #6CH)C $ wA	A RS3r73CH)C  
 
r%   )r   r   re   r  r  )	r  r  r  r  r  r  rp  r  r&  s	   &&&&   @@r&   _np_correlate_core_implr(    sP    CIIDCIID			$	%B		3995I>@ Kr%   c                 \  aa \        V R 4       \        VR 4       \        R 4       p\        R 4       pV P                  \        P                  9   d*   VP                  \        P                  9   d   VoVoM-VoVoM(VP                  \        P                  9   d   VoVoMVoVoRVV3R llpV# )znp.correlatec                 .    \         P                  ! V 4      # r+   )re   r   r  s   &r&   op_conj_np_correlate.<locals>.op_conj  s    wwqzr%   c                     V # r+   r$   r  s   &r&   op_nop_np_correlate.<locals>.op_nop  s    r%   c                    < \        V 4      p\        V4      pV^ 8X  d   \        R4      hV^ 8X  d   \        R4      hW48  d   \        S! V4      S! V 4      VR4      # \        S! V 4      S! V4      V^4      # )rb   'a' cannot be empty'v' cannot be emptyrg  rF   r   r  )r,   rj   r  lalva_opb_ops   &&&  r&   rp  _np_correlate.<locals>.impl  sr    VV723372337%d1gtAwbAA%d1gtAwa@@r%   r  )r  r   r   r   r  )r,   rj   r  r+  r.  rp  r6  r7  s   &&&   @@r&   _np_correlater:    s    q.!q.!    	ww%&&&77e***DDDD77e***DDDDA A Kr%   c                 @    \        V R 4       \        VR 4       RR lpV# )znp.convolvec                     \        V 4      p\        V4      pV^ 8X  d   \        R4      hV^ 8X  d   \        R4      hW48  d   \        WRRR1,          V^4      # \        WRRR1,          V^4      # )rb   r1  r2  Nrg  r3  )r,   rj   r  r4  r5  s   &&&  r&   rp  np_convolve.<locals>.impl  sm    VV723372337%a4R4$::%a4R4$::r%   r   )r  )r,   rj   r  rp  s   &&& r&   np_convolver?    s"    q- q- ; Kr%   c                   aaa \        V 4      '       g   R # \        V \        P                  4      '       d<   \	        V4      '       g   V P
                  VP
                  8X  d   R	R lpV# R	R lp V# \        V \        P                  \        P                  34      '       d!   \	        V4      '       d   R	R lpV# R	R lp V# \        V \        P                  \        P                  34      '       d+   \	        V4      '       d   T MTp\        V4      oR	V3R llpV# \        V \        P                  P                  4      '       do   \        V P
                  \        P                  \        P                  34      '       g   \        R4      h\	        V4      '       d   V P
                  MToR	V3R llpV# \        V \        P                  4      '       d+   \        P                   ! V P"                  4      oR	V3R llpV# R pV# )
Nc                     V # r+   r$   r,   r   s   &&r&   rp  np_asarray.<locals>.impl  s    r%   c                 $    V P                  V4      # r+   )r  rB  s   &&r&   rp  rC    s    xx&r%   c                 .    \         P                  ! V 4      # r+   r  rB  s   &&r&   rp  rC  &  s    xx{"r%   c                 .    \         P                  ! W4      # r+   r  rB  s   &&r&   rp  rC  )  s    xx))r%   c                 2   < \         P                  ! V S4      # r+   r  )r,   r   r@  s   &&r&   rp  rC  /  s    88Ar?"r%   z?asarray support for List is limited to Boolean and Number typesc                 ~   < \        V 4      p\        P                  ! VSR 7      p\        V 4       F	  w  rEWSV&   K  	  V# r-  )rF   re   r   r   )r,   r   r  r  r-   rj   target_dtypes   &&    r&   rp  rC  9  s8    AA((1L1C!!A %Jr%   c                 $   < SP                  4       # r+   )r  )r,   r   rh   s   &&r&   rp  rC  B  s    88:r%   r+   )r	   rW   r   r   r   r   r+  rZ   r   r   r   
containersListTyper   StringLiteralre   r  rY   )r,   r   rp  dt_convrh   rI  r@  s   &&  @@@r&   
np_asarrayrO    s   
 A!U[[!!uEKK!7V KQ'P KM 
A4	5	5 u#B K=*< K9 
Aemm4	5	5"5))!ug	#0 K- 
Au''00	1	1!''ELL%--#@AA./ / #.e"4"4qww%	 K 
Au**	+	+jj)	
 K Kr%   c                   a \        V\        P                  4      '       d   \        V4      p\        P
                  ! V\        P                  4      '       g   \        P                  oMVo\        P                  3V3R  llpV# )c                 2   < \         P                  ! V S4      # r+   r  )r,   r   r  s   &&r&   rp  np_asfarray.<locals>.implU  s    ::a$$r%   )rW   r   Typer   re   r  r  r   )r,   r   rp  r  s   && @r&   np_asfarrayrT  K  sS     eUZZ((UOE}}UBJJ//BB** 	%r%   c                     R  pV# )c                 :   \         P                  ! V 4      P                  4       p\         P                  ! V4      pVP                  ^ 8X  d   \	        R4      h\         P
                  ! W#P                  R 4      '       d)   VP                  VP                  8  d   Rp\	        V4      h\        VP                  VP                  4      p\        V4       Uu. uF&  qbV,          '       g   K  VP                  V,          NK(  	  pp\         P                  ! V4      # u upi )rb   z"Cannot extract from an empty arrayNz+condition shape inconsistent with arr shape)
re   r  r  r   r   r  r  r2   r   r  )r  rh   r	  r,   r   max_lenr   r   s   &&      r&   np_extract_impl#np_extract.<locals>.np_extract_impl]  s    zz)$,,.JJsO66Q;ABB 66$vvw-  TYY%7?CS/! affdii(&+GnBnsS		{qvvc{{nBxx} Cs   D)Dr$   )r  rh   rX  s   && r&   
np_extractrZ  Z  s    ( r%   c                 b   RR lp\        V \        P                  \        P                  34      '       g   \	        R4      h\        V\        P                  \        P                  34      '       g   \	        R4      h\        V\
        \        P                  \        P                  34      '       g   \	        R4      h\        V ^ ,          \        P                  4      '       g   \	        R4      h\        V^ ,          \        P                  4      '       g   \	        R4      h\        V ^ ,          \        P                  4      '       d=   \        V ^ ,          P                  \        P                  4      '       g   \	        R4      h\        V ^ ,          \        P                  4      '       da   \        V ^ ,          \        P                  4      '       d/   \        V ^ ,          ^ ,          \        P                  4      '       g   \	        R4      h\        V ^ ,          \        P                  4      '       d5   V ^ ,          P                  V^ ,          P                  8w  d   \	        R	4      h\        V ^ ,          \        P                  4      '       d$   V ^ ,          P                  ^8  d   \	        R
4      hV# )rb   c                 d   \        V 4      \        V4      8w  d   \        R 4      hV\        P                  ! V^ ,          P                  V^ ,          P
                  4      ,          p\        \        V 4      ^,
          RR4       F*  pW,          pW,          p\        P                  ! WVV4      pK,  	  V# )z7list of cases must be same length as list of conditionsrg  )rF   r   re   rH  r   r   r2   rJ  )condlist
choicelistdefaultr   r-   r	  choices   &&&    r&   np_select_arr_impl%np_select.<locals>.np_select_arr_implw  s    x=C
O+ - . .
1 3 3Z]5H5HIIs8}q("b1A;D]F((4-C 2 
r%   z"condlist must be a List or a Tuplez$choicelist must be a List or a Tuplez,default must be a scalar (number or boolean)z items of condlist must be arraysz"items of choicelist must be arraysz%condlist arrays must contain booleansz*condlist tuples must only contain booleanszHcondlist and choicelist elements must have the same number of dimensionsz/condlist arrays must be of at least dimension 1r   )rW   r   ListrG   r   r  r   r   r   r   r   )r]  r^  r_  ra  s   &&& r&   	np_selectrd  t  s   
 hU^^ <==ABBj5::u~~">??CDDgU\\5==ABBKLL hqk5;;//?@@jmU[[11ABB (1+u{{++(1+++U]];; !HII(1+u~~..8A;77x{1~u}}== !MNN8A;,,QK
1 2 22 9 : 	:(1+u{{++0@0@10DNOOr%   c                 F   \        V 4      '       d   \        V4      '       g   \        R 4      hRV P                  P                  9   g   RVP                  P                  9   d;   V P                  P                  VP                  P                  8w  d   \        R4      hR pV# )z.The arguments to np.union1d must be array-likeunichrz/For Unicode arrays, arrays must have same dtypec                     \         P                  ! \         P                  ! V 4      4      p\         P                  ! \         P                  ! V4      4      p\         P                  ! \         P                  ! W#34      4      # r+   )re   ri  r  r  rO  )rk  rl  r,   r  s   &&  r&   
union_implnp_union1d.<locals>.union_impl  sH    HHRZZ_%HHRZZ_%yy/00r%   )r	   r   r   rC  )rk  rl  rh  s   && r&   
np_union1drj    st    C  (8(=(=JKK	SYY^^	#x399>>'A
yy~~'KLL1
 r%   c                 8  a R p\        V \        P                  \        P                  \        P                  34      '       g   \        V4      h\        V4      '       d   V P                  oM \        V4      oRV3R llpV#   \         d    \        R4      hi ; i)z7The argument to np.asarray_chkfinite must be array-likez!dtype must be a valid Numpy dtypec                    < \         P                  ! V SR 7      p \         P                  ! V 4       F*  p\         P                  ! V4      '       d   K!  \	        R4      h	  V # )r.  z#array must not contain infs or NaNs)re   r  rf   r  r   )r,   r   r-   r  s   && r&   rp  "np_asarray_chkfinite.<locals>.impl  sE    JJq#1A;;q>> !FGG  r%   r+   )
rW   r   r   r+  rZ   r   r   r   r   r   )r,   r   r   rp  r  s   &&  @r&   np_asarray_chkfinitern    s     DCa%++u~~u{{CDD#5WW	C%B K ( 	CABB	Cs   -B Bc                 X  aaa \        V\        \        P                  34      '       g   R p\	        V4      h\        V 4      '       g   Rp\	        V4      h\        V\        P                  \        P                  34      '       g*   \        P                  ! V4      '       g   Rp\	        V4      h\        V\        \        P                  34      '       g   Rp\	        V4      h\        ^RR4      3o\        V\        P                  4      '       d5   \        P                  ! \        V P                  4      \        V4      4      oM8\        P                  ! \        V P                  4      \        P                   4      o\        P"                  ! S\        P$                  4      oRVVV3R llpV# )z&The argument "axis" must be an integerz#The argument "p" must be array-likez'The argument "discont" must be a scalarz&The argument "period" must be a scalarNc                   < VR8w  d   Rp\        V4      h\        P                  ! V 4      P                  S4      pVP                  pVR,          pVP                  VP                  V,          V34      pVf
   V^,          pS'       d   \        V^4      w  rV
^ 8H  pMV^,          p	RpV	) p\        VP                  V,          4       EFh  pW,          p\        P                  ! V4      p\        P                  ! W,
          V4      V,           pV'       d&   \        P                  ! VV8H  V^ 8  ,          V	V4      pVV,
          p\        P                  ! \        P                  ! V Uu. uF  p\        V4      NK  	  up4      V8  ^ V4      p\        P                  ! \        P                  ! V Uu. uF  p\        V4      NK  	  up4      V8  ^ V4      p\        P
                  ! VVP                  4      p\        P                  ! V4      pVS,          VP                  4       ,           VS&   VW&   EKk  	  VP                  V4      # u upi u upi )r   z*Value for argument "axis" is not supportedTrg  )r   re   r  r  r   rj  r   divmodr2   r  modrJ  r  r  r  r   )pdiscontr\   periodr   p_init
init_shape	last_axisp_newinterval_highremboundary_ambiguousinterval_lowr-   rowddddmod
ph_correctr  ph_ravelupr   integer_inputslice1s   &&&&                 r&   rp  numpy_unwrap.<locals>.impl  s   2:>CS/!A%%e,\\
rN	y 8)DE?qjG!'!2M!$"QJM!%%~ v{{i/0A(CBFF2,f5DE!%<"7BF!C!.7J"((B+?BqCFB+?"@7"JA",.Jxx")="Q#a&")= > H! *,HHj.>.>?JBVz'8'8'::BvJEH! 1$ }}Z(( ,@)=s   'I/I
Nrg  g-DT!@)rW   r  r   r   r   r	   r   r   r   r  r   rO   re   r  r   r   r   r  integer)	rs  rt  r\   ru  r   rp  r   r  r  s	   &&&&  @@@r&   numpy_unwrapr    s(   dS%--0116#A3#w <==''007#fuell3446#AtT"$F&%,,''x0(62BCx0"**=MM%4M') ')R Kr%   c                     \         P                  ! R V ,
          V ^4      p\         P                  ! \         P                  ! V^ 4      ^W^,
          ,          ,           ^W^,
          ,          ,
          4      # )r  )re   r  rJ  
less_equalr7  r  s   & r&   np_bartlett_implr    sJ    
		"q&!QA88BMM!Q'Qa%[!aq5k/JJr%   c                 f   \         P                  ! R V ,
          V ^4      pRR\         P                  ! \         P                  V,          V ^,
          ,          4      ,          ,           R\         P                  ! R\         P                  ,          V,          V ^,
          ,          4      ,          ,           # )r  gzG?r  g{Gz?r  re   r  cosr  r  s   & r&   np_blackman_implr  %  so    
		"q&!QA3	QU 3444266#+/QU3445 6r%   c                     \         P                  ! ^V ,
          V ^4      pRR\         P                  ! \         P                  V,          V ^,
          ,          4      ,          ,           # )r   gHzG?gq=
ףp?r  r  s   & r&   np_hamming_implr  ,  sB    
		!a%AA$	QU 34444r%   c                     \         P                  ! ^V ,
          V ^4      pRR\         P                  ! \         P                  V,          V ^,
          ,          4      ,          ,           # )r   r  r  r  s   & r&   np_hanning_implr  2  sB    
		!a%AArvvbeeai1q512222r%   c                    a  V 3R  lpV# )c                 j   < \        V \        P                  4      '       g   \        R 4      hV3R lpV# )M must be an integerc                    < V ^8  d'   \         P                  ! R\         P                  R7      # V ^8X  d'   \         P                  ! ^\         P                  R7      # S! V 4      # )r   r.  r$   )re   r  r   rH  )r7  funcs   &r&   window_impl>window_generator.<locals>.window_overload.<locals>.window_impl=  sD    1uxx"**55Avwwq

337Nr%   )rW   r   r   r   )r7  r  r  s   & r&   window_overload)window_generator.<locals>.window_overload9  s-    !U]]++455	 r%   r$   )r  r  s   f r&   window_generatorr  8  s     r%   c                     V^ ,          pRp\        ^\        V4      4       F#  pTpTpW,          V,
          W,          ,           pK%  	  RVX,
          ,          # )rb   r   r  r  )r  valsb0b1r-   b2s   &&    r&   _chbevlr    sQ    	aB	B1c$i Vb[47" !
 "r'?r%   c                 B   V ^ 8  d   V ) p V R8:  d<   RV ,          R,
          p\         P                  ! V 4      \        V\        4      ,          # \         P                  ! V 4      \        RV ,          R,
          \        4      ,          \         P
                  ! V 4      ,          # )rb   g       @r  r  g      @@)re   expr  _i0A_i0Brn  r  s   & r&   _i0r    sm    1uBCx1WOvvay71d+++66!9wtax#~t44rwwqzAAr%   c           	      h   \         P                  ! V \         P                  R 7      p\        \         P                  ! V4      4      p\	        \        V4      4       FT  p\        V\         P                  ! ^W,          V,
          V,          R,          ,
          4      ,          4      V,          W5&   KV  	  V# )r.  r  )re   r  r   r  r2   rF   rn  )r  alphabetar!  tr-   s   &&&   r&   _i0nr    sv    
arzz*ABJJtA3q6]4"''!u'=&C"CDDEI  Hr%   c                     \        V \        P                  4      '       g   \        R 4      h\        V\        P                  \        P                  34      '       g   \        R4      hR pV# )r  z beta must be an integer or floatc                    V ^8  d'   \         P                  ! R\         P                  R7      # V ^8X  d'   \         P                  ! ^\         P                  R7      # \         P                  ! ^ V 4      pV ^,
          R,          p\        W#V4      # )r   r.  r  r$   )re   r  r   rH  r  r  )r7  r  r  r  s   &&  r&   np_kaiser_impl!np_kaiser.<locals>.np_kaiser_impl  sc    q588Bbjj116771BJJ//IIaOQ#Ad##r%   )rW   r   r   r   r   )r7  r  r  s   && r&   	np_kaiserr    sR    a''011dU]]EKK899<==	$ r%   c                 v   R  pV! V 4      w  rEpV! V4      w  rxp	\         P                  ! WY4      \         P                  ! Wh4      ,
          p
\         P                  ! Wg4      \         P                  ! WI4      ,
          p\         P                  ! WH4      \         P                  ! WW4      ,
          pWR&   WR&   WR&   R# )c                     V R,          pV R,          pV P                   R,          ^8X  d   V R,          pM0\        P                  ! V P                  P	                  ^ 4      V4      pWV3# )..rb   .r   rg  .r(  )r   re   r  r   r   )r  x0r  x2s   &   r&   _cross_preprocessing._cross_operation.<locals>._cross_preprocessing  sS    vYvY772;!6BQWW\\!_b1Brzr%   Nr  r  r  )re   r  )r,   r  r   r  a0rc  rY  r  r  r  cp0cp1cp2s   &&&          r&   _cross_operationr    s     &a(JBB%a(JBB
++b
B 3
3C
++b
B 3
3C
++b
B 3
3CKKKr%   c                     R # r+   r$   r  s   &&r&   _crossr    r}  r%   c                    a \         P                  ! \        V P                  4      \        VP                  4      4      oV P                  ^8X  d   VP                  ^8X  d	   V3R lpV# V3R lpV# )r   c                 N   < \         P                  ! RS4      p\        WV4       V# )r)  r)  )re   r   r  )r,   r  cpr   s   && r&   rp  _cross_impl.<locals>.impl  s"    $&BQ2&Ir%   c                    < \         P                  ! V R,          VR,          4      P                  p\         P                  ! VR,           S4      p\	        WV4       V# ).r  r  )re   r<  r   r   r  )r,   r  r   r  r   s   &&  r&   rp  r    sD    FF1V9ai066E%$,.BQ2&Ir%   )re   r  r   r   r   )r,   r  rp  r   s   && @r&   _cross_implr    sT    Xagg.0ABEvv{qvv{	 K	
 Kr%   c                 f    \        V 4      '       d   \        V4      '       g   \        R 4      hR pV# )Inputs must be array-like.c                 \   \         P                  ! V 4      p\         P                  ! V4      pVP                  R,          R9  g   VP                  R,          R9  d   \        R4      hVP                  R,          ^8X  g   VP                  R,          ^8X  d   \	        W#4      # \        R4      h)r   zDIncompatible dimensions for cross product
(dimension must be 2 or 3)zDimensions for both inputs is 2.
Please replace your numpy.cross(a, b) call with a call to `cross2d(a, b)` from `numba.np.extensions`.rg  r'  )re   r  r   r   r  r,   r  r1  r2  s   &&  r&   rp  np_cross.<locals>.impl  s    ZZ]ZZ]88B<v%"V)C- 
 88B<1 1">!H r%   r	   r   r,   r  rp  s   && r&   np_crossr    s0    A&6q&9&9677" Kr%   c                     R  pV! V 4      w  r4V! V4      w  rV\         P                  ! W64      \         P                  ! WE4      ,
          p\         P                  ! V4      # )c                 ,    V R,          pV R,          pW3# ).r  r  r$   )r  r  r  s   &  r&   r  0_cross2d_operation.<locals>._cross_preprocessing  s    vYvYvr%   )re   r  r  )r,   r  r  r  rc  r  r  r  s   &&      r&   _cross2d_operationr    sM    
 "!$FB!!$FB	R	r{{22	2B ::b>r%   c                     R # r+   r$   r  s   &&r&   cross2dr    r}  r%   c                 f    \        V 4      '       d   \        V4      '       g   \        R 4      hR pV# )r  c                     \         P                  ! V 4      p\         P                  ! V4      pVP                  R,          ^8w  g   VP                  R,          ^8w  d   \        R4      h\	        W#4      # )r   zRIncompatible dimensions for 2D cross product
(dimension must be 2 for both inputs)rg  )re   r  r   r   r  r  s   &&  r&   rp  cross2d_impl.<locals>.impl(  sZ    ZZ]ZZ]88B<1 18  ""))r%   r  r  s   && r&   cross2d_implr  #  s0    A&6q&9&9677* Kr%   c                   a \        V \        P                  4      '       g   \        R 4      hV P                  ^8  d   \        R4      h\        V\
        \        P                  34      '       g   \        R4      h\        R8  oRV3R llpV# )z#The first argument must be an arrayzarray must be 1Dz$The second argument must be a stringc                 J  < \         P                  ! V 4      p^ pVP                  4       pRV9   d+   V F$  pV^ 8X  g   S'       d   VR8X  d   V^,           pK$   M	  \        V 4      pRV9   d5   VRRR1,           F$  pV^ 8X  g   S'       d   VR8X  d   V^,
          pK$   M	  W#V # )rb   r   r  Nrg  )re   r  r  rF   )filttrimr1  firstr-   lasttrim_escapess   &&    r&   rp  np_trim_zeros.<locals>.implB  s    ZZzz|$;6lqBw!AIE	 
 4y$;"XX6lqBw!8D	 
 ~r%   )r(  r(  fb)rW   r   r   r   r   strUnicodeTyper   )r  r  rp  r  s   && @r&   np_trim_zerosr  5  sq    dEKK((BCCyy1}/00dS%"3"3455CDD F*L& Kr%   c                     \        V 4      '       g   \        V4      '       g   \        R 4      h\        V\        P                  \
        34      '       g   \        R4      hRR lpV# )z+setxor1d: first two args must be array-likez2setxor1d: Argument "assume_unique" must be booleanc                 8   \         P                  ! V 4      p\         P                  ! V4      pV'       g.   \         P                  ! V4      p\         P                  ! V4      pM VP                  4       pVP                  4       p\         P                  ! W434      pVP                  4        \         P                  ! VP                  ^ ,          ^,           \         P                  R7      pRV^ &   RVR&   VR,          VRR 8g  V^R% WVR,          VRR ,          ,          # )rb   r.  Tr  Nrg  )	re   r  r  ri  rO  rj  r   r   r   )rk  rl  rm  r,   r  rn  flags   &&&    r&   np_setxor1d_impl)jit_np_setxor1d.<locals>.np_setxor1d_impl`  s    JJsOJJsO		!A		!A	A	A nnaV$
xx		!q(9QRWCR(Qr
8d3Bi'((r%   r  rr  )rk  rl  rm  r  s   &&& r&   jit_np_setxor1dr  X  sS    S!!%5c%:%:GHH}u}}d&;<<NOO), r%   c                    \         P                  ! V 4      P                  4       p \         P                  ! V4      P                  4       p\        V4      ^
\        V 4      R,          ,          8  d   V'       dF   \         P                  ! \        V 4      \         P
                  R7      pV F  pW@V8g  ,          pK  	  V# \         P                  ! \        V 4      \         P
                  R7      pV F  pW@V8H  ,          pK  	  V# V'       g   \         P                  ! V 4      pW,          p\         P                  ! VP                  \         P
                  R7      pRVR&   VR,          VRR	 8g  VR&   Wt,          p \         P                  ! V4      ^,
          p\         P                  ! VP                  \         P                  R7      p	WV&   \         P                  ! V4      p\         P                  ! W34      p
V
P                  RR7      pW,          p\         P                  ! VP                  \         P
                  4      pV'       d   VR,          VRR	 8g  VRR	% MVR,          VRR	 8H  VRR	% W=R	R% \         P                  ! V
P                  \         P
                  R7      pWV&   V'       d   VR\        V 4       # VX	,          # )
r  g(\?r.  T:Nr   Nr  N	mergesort)kindrg  )re   r  ri  rF   rH  r   r'  argsortr   r   r   r4   r  rO  r   )rk  rl  rm  invertrM  r,   order1rn  imaskinv_idxarordersarr  r  s   &&&&           r&   
_in1d_implr  {  s   
 **S/


!C
**S/


!C
 3x"s3x5(((773s82884D"   88CHBHH5D"   Ckxx		2Rr7c#2h&Ri		$!#((4::RWW5iin	
	#B JJKJ(E
)C88CHHbhh'DWCR(Sb	WCR(Sb	I
((288288
,CJ 9CH~7|r%   c                     \        V 4      '       g   \        V4      '       g   \        R 4      h\        V\        P                  \
        34      '       g   \        R4      hRR lpV# )z,setdiff1d: first two args must be array-likez3setdiff1d: Argument "assume_unique" must be booleanc                 .   \         P                  ! V 4      p \         P                  ! V4      pV'       d"   V P                  4       p VP                  4       pM,\         P                  ! V 4      p \         P                  ! V4      pV \	        WR R R7      ,          # )Trm  r  )re   r  ri  r  r  )rk  rl  rm  s   &&&r&   np_setdiff1d_impl+jit_np_setdiff1d.<locals>.np_setdiff1d_impl  sc    jjojjo))+C))+C))C.C))C.C:cd4HIIr%   r  rr  )rk  rl  rm  r  s   &&& r&   jit_np_setdiff1dr    sT    S!!%5c%:%:HII}u}}d&;<<OPP	J r%   c                 .   \        V 4      '       g   \        V4      '       g   \        R 4      h\        V\        P                  \
        34      '       g   \        R4      h\        V\        P                  \
        34      '       g   \        R4      hRR lpV# )z'in1d: first two args must be array-likez.in1d: Argument "assume_unique" must be booleanz'in1d: Argument "invert" must be booleanc                     \        WW#4      # r+   )r  )rk  rl  rm  r  s   &&&&r&   np_in1d_impl!jit_np_in1d.<locals>.np_in1d_impl  s    #M::r%   FFrr  )rk  rl  rm  r  r  s   &&&& r&   jit_np_in1dr	    su    S!!%5c%:%:CDDmemmT%:;;JKKfu}}d344CDD; r%   c                 .   \        V 4      '       g   \        V4      '       g   \        R 4      h\        V\        P                  \
        34      '       g   \        R4      h\        V\        P                  \
        34      '       g   \        R4      hRR lpV# )z'isin: first two args must be array-likez.isin: Argument "assume_unique" must be booleanz'isin: Argument "invert" must be booleanc                 |    \         P                  ! V 4      p \        WVVR 7      P                  V P                  4      # )r   )re   r  r  rj  r   )r  test_elementsrm  r  s   &&&&r&   np_isin_impl!jit_np_isin.<locals>.np_isin_impl  s3    **W%'!'))0)?	@r%   r  rr  )r  r  rm  r  r  s   &&&& r&   jit_np_isinr    sv    W%%)9-)H)HCDD}u}}d&;<<JKKvt455CDD@ r%   r+   r  r  )r(  rb   r  r>  r   rh  r  )r(     r  rd  rv  r  r  r  )ibetar&  machepepsnegepepsnegiexpminexpxminmaxexpxmaxirndngrdepsilontinyhuge	precision
resolution)r  r  r  r  r3  r  r  r  r  nexpnmantr   r!  r  bits)r  r3  r$  r9  r>  r  )g4!\Tg}b3<gr넱g^<g"P
g'&&KF5=gbLag$ӛ/=gjzg<t̾=gVg4T&>g0Kg5dMv;p>g"c쑾g$>g'doҾgY(X?>gZY&+g|t(?gRBguZ?gI ^qga?g!Ng-Ί>?g-4pKgw?gWӿg*5N?)gT`g0fFVg!<gA`<gҫ`g8箸g}<g攐*<gbe~g2hϙ]'gE_V=gsk[=g&GCi=gfCg{~5g%t9QgO $=guo >g["d,->gmրVX>gna>g+A>gRx?gI墌k?g	b?r  r  (  __doc__r  collectionsr   r  r  llvmlite.irr  numpyre   
numba.corer   r   numba.core.extendingr   r   r   numba.np.numpy_supportr   r	   r
   r   r   r   r   r   numba.core.imputilsr   r   r   r   numba.np.arrayobjr   r   r   r   numba.np.linalgr   r   numba.core.errorsr   r   r   r   r   r   numba.cpython.unsafe.tupler    r'   r  rK   r`   r  r   ry   r|   r   r4   	DTypeSpecIntegerLiteralr   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  aminr1  r3  amaxr?  rF  rK  rP  rQ  rZ  r_  rb  rd  rY  rs  rx  ry  r  r  r  r  r  r  averager  r  	iscomplexr  isrealr  r  r  isscalarr  r  r
  r  r  r  r  r  r7  r=  r6  r<  r"  r4  nanminr9  nanmaxr>  rI  rF  rO  rL  nanstdrR  nansumrX  nanprodr^  
nancumprodrg  	nancumsumrn  rr  ry  r|  r  r  r  r  r  r  r  r  r  r  _partition_w_nan_argpartition_w_nanr  r  r  r  r  r  medianr  r  r  r  r  r  r  r  r  r  nanpercentiler  quantiler  nanquantiler  	nanmedianr	  r  r  r  	partitionr.  r  r3  r9  rH  r?  rB  rN  trilr_  ro  rj  tril_indices_fromru  rx  triur  r  r  triu_indices_fromr  r  r  r  ediff1dr  r  r  r  r  r  trapzr  	trapezoidr  r  r  vanderr  rollr  r  r  r  r  interpr  r  r'  r)  r6  r8  rf  r  rD  rF  re  rK  rU  rY  r[  rl  ri  corrcoefrx  argwherer  flatnonzeror  r  r  r  r  r  r  rp  r  fill_diagonalr  r  r  r  aroundr  r  round_r  r  r  r  rd  r   r  r
  r  r  rJ  r   r+  r   r1  r  r7  containsr<  count_nonzerorC  rT  rU  deleterV  r  r`  array_equalrg  intersect1drs  rw  ry  r  r  r  r  r  r  r  r  r  r   r  r  r  digitizer  r2   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r(  	correlater:  convolver?  r  rO  asfarrayr   rT  extractrZ  selectrd  union1drj  asarray_chkfinitern  unwrapr  r  r  r  r  r  bartlettblackmanhamminghanningr  r  r  r  r  r  kaiserr  r  r  r  crossr  r  r  r  
trim_zerosr  setxor1dr  r  	setdiff1dr  r	  in1disinr  r$   r%   r&   <module>rq     s	  
  "     % L LM M MG G/ / ' *H H 5 ]
 %! %!P E! E!V rvvu{{#{EKK(E ) $E  >B rvvu{{EJJ@rvvu{{E$8$8%//J{EKKU__E{EKK)=)=uO$D P F K A$DN rvvu{{U__5{EKK9E : 6E rvvu{{EJJ/rvvu{{E$8$89{EKK4{EKK)=)=>%D ? 5 : 0%DP 
"''f%  &  , 
"))h'! ( !. 
"**i(" ) ". 
"''f% & B 
"&&e$ %   
"&&e$ %        
"&&	"''e$2 %  2j 
"&&	"''e$2 %  2j  *  *  & 
"))h' ( $  *  *  ")X 
"))h' ( $ 
"&&e$ % (  2 
"++j)?, * ?,D 
"&&e$ % & 
"** >
 
",,  
"))  
"// & 
",,  
"++ 
 
"++& &
 
"++& &
     P P
D 	E: u= "	D9 "t<
 2 2 
"**5 5p 
"))  
"))  
"** & 
")) 0 
"))  
")) * 
"** * 
"-- 0 
",, 0  (		 
.H H 
.H H	 
- . 
"&& 6 6EKK'/  .b 0;<
#$67J$KL &'9(  " ?:6
7 1A!BC$_5H%IJ     0 3 3 
")) " 1 1h       F F
 B B
  ""4 
"--  
"

  
"++  
"..  
",, 0  (  *  D 
",, : 
"//   @ 	 	 
"&&
 
    > >
 
"''" "4 
"//
  
  
"


%  
% > >
 
"''" "2 
"//
  
  
"


%  
%	 
.1 1 " 
"**4 4n	 
/ 	 
& , 6bhh% %
 Fbll% % < <6 @ @ 
"))$" $"N 
"'' 2   A AH j jZ U Up 
"))% %V 	 	  0	 

"#$$ $$$N     %[1 ** 8 8 $K0  9 94 3 3   
"&&7 7t 
"++   H 
"++ 0 
".. "  *     D D D D n-
	 
(1 1 
"

 @,
  " ) )4 
"))	"((4  4n 6RYY& 
"''M M& 
"((< <@ rzz5;;',5D - (5Dp    . 
"((    
"((2 2j 
"''  
"''  
(


 
 
"

   -\: ,-EF  
"))+% +%\ 
"''# #L 
".. * 
"..   :1 
"++6 6r #9-$Z0  ! !B     	 	 + +$ %fg%67 ;8 
"//0 0f 
"++A AH 
 
",,O Oh%  
H0	13 
 	7,- + 7,-
<    
"((  
"(( <O	 

F FR 
",,) )X 
"++ * 
"**4 4n 6bkkZZ   
"** 2 
"))/ /d 
"**  
"

  0 
"))C C\ K K
 6 6 5 5
 3 3
" 	 &'78 9  &'78 9  %o6 7  %o6 7 
xx  B 
xx  : 	 	 B B   
")) *  .	 
&   
"(( 0  &	 
' " 
"-- D 
"++ D 7 7t 
",, * 6RWWk" 
"'' r%   