+
    :iV                    J   ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RI Ht ^ RIHt ^ RI	t
^ RIHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHtHt ^ R
IHt ^ RIHt ^ RIHt ^ RIH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t( ^ RI)t)R t*R t+R t,R t-R t.RR lt/R t0R t1R t2R t3R t4R t5R t6RR lt7R t8R t9R t:R t;R  t<R! t=R" t>R# t?R$ t@R% tAR& tBRR' ltCRR( ltDRR) ltER* tFR+ tGR, tHR- tIR. tJR/ tKR0 tLR1 tMRR2 ltNR3 tORR4 ltPR5 tQRR6 ltRRR7 ltSRR8 ltTR9 tUR: tVR; tWRR< ltXRR= ltYR> tZRR? lt[RR@ lt\RRA lt]RB t^RRC lt_RD t`RRE ltaRRF ltbRRG ltcRH tdRRI lteRJ tfRRK ltgRL thRRM ltiRRN ltjRRO ltkRP tlRRQ ltmRRR ltnRS toRT tpRRU ltqRRV ltrRRW ltsRX ttRY tuRZ tv]
P                  3R[ ltxR\ tyR] tzR^ t{R_ t|R` t}Ra t~Rb tRc tRd tRe tRRf ltRRg ltRh tRi tRj tRRk ltRl tRm tRn tRo tRp tRq tRr tRRs ltRt tRu tRv tRw tRRx ltRRy ltRz tR{ tR| tR} tR~ tR tRR ltR tR tRR ltR tRR ltR tRR ltR tRR ltRR ltRR ltR tRR ltRR ltRR lt ! R R]!] 4      t ! R R] 4      t ! R R] 4      t]R8X  d   ])EPb                  ! 4        R# R# )    N)partial)product)dedent)jitnjittypeof)types)ListDict)numpy_version)TypingErrorNumbaDeprecationWarning)	IS_32BITS)pysignaturecross2d)	TestCaseMemoryLeakMixin
needs_blasrun_in_subprocessskip_if_numpy_2
IS_NUMPY_2IS_MACOS_ARM64REDUCED_TESTINGskip_if_reduced_testingc                 .    \         P                  ! V 4      # N)npsincxs   &[/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_np_functions.pyr   r          771:    c                 .    \         P                  ! V 4      # r   r   angler    s   &r"   angle1r(   !       88A;r$   c                 .    \         P                  ! W4      # r   r&   )r!   degs   &&r"   angle2r,   %   s    88Ar$   c                 .    \         P                  ! W4      # r   )r   array_equalabs   &&r"   r.   r.   )       >>!r$   c                 .    \         P                  ! W4      # r   r   intersect1dr/   s   &&r"   intersect1d_2r6   -   r2   r$   c                 0    \         P                  ! WV4      # r   r4   r0   r1   assume_uniques   &&&r"   intersect1d_3r:   1   s    >>!..r$   c                 2    \         P                  ! WVR 7      # axis)r   append)arrvaluesr>   s   &&&r"   r?   r?   5   s    99St,,r$   c                 0    \         P                  ! WR 7      # r<   )r   count_nonzero)r@   r>   s   &&r"   rC   rC   9   s    C++r$   c                 .    \         P                  ! W4      # r   )r   delete)r@   objs   &&r"   rE   rE   =   s    99Sr$   c                 .    \         P                  ! V 4      # r   r   diffr0   s   &r"   diff1rK   A   r#   r$   c                 .    \         P                  ! W4      # r   rH   )r0   ns   &&r"   diff2rN   E       771=r$   c                 .    \         P                  ! V 4      # r   r   bincountrJ   s   &r"   	bincount1rS   I       ;;q>r$   c                 0    \         P                  ! WR 7      # )weightsrQ   )r0   ws   &&r"   	bincount2rY   M   s    ;;q$$r$   c                 0    \         P                  ! WV4      # r   rQ   )r0   rX   	minlengths   &&&r"   	bincount3r\   Q   s    ;;qY''r$   c                 .    \         P                  ! W4      # r   r   searchsortedr0   vs   &&r"   r_   r_   U       ??1  r$   c                 2    \         P                  ! WR R7      # )leftsider^   r`   s   &&r"   searchsorted_leftrg   Y   s    ??1f--r$   c                 2    \         P                  ! WR R7      # )rightre   r^   r`   s   &&r"   searchsorted_rightrj   ]   s    ??1g..r$   c                  *    \         P                  ! V !  # r   )r   digitizeargss   *r"   rl   rl   a   s    ;;r$   c                  *    \         P                  ! V !  # r   )r   	histogramrm   s   *r"   rp   rp   e   s    <<r$   c                  ,    \         P                  ! 4       # r   )r   MachArrm   s   *r"   macharrs   i   s    99;r$   c                 .    \         P                  ! V 4      # r   )r   	iscomplexr    s   &r"   ru   ru   m       <<?r$   c                 .    \         P                  ! V 4      # r   )r   iscomplexobjr    s   &r"   rx   rx   q       ??1r$   c                 .    \         P                  ! V 4      # r   )r   isscalarr    s   &r"   r{   r{   u   rT   r$   c                 .    \         P                  ! V 4      # r   )r   isrealr    s   &r"   r}   r}   y       99Q<r$   c                 .    \         P                  ! V 4      # r   )r   	isrealobjr    s   &r"   r   r   }   rv   r$   c                 .    \         P                  ! W4      # r   )r   isneginfr!   outs   &&r"   r   r          ;;qr$   c                 .    \         P                  ! W4      # r   )r   isposinfr   s   &&r"   r   r      r   r$   c                 2    \         P                  ! WW#V4      # r   )r   iscloser0   r1   rtolatol	equal_nans   &&&&&r"   r   r      s    ::aD	22r$   c                 .    \         P                  ! V 4      # r   )r   isnatr    s   &r"   r   r      r)   r$   c                  *    \         P                  ! V !  # r   )r   iinform   s   *r"   r   r          88T?r$   c                  *    \         P                  ! V !  # r   )r   finform   s   *r"   r   r      r   r$   c                  >    \         P                  ! V !  P                  # r   )r   r   rs   rm   s   *r"   finfo_macharr      s    88T?!!!r$   c                 .    \         P                  ! V 4      # r   r   fliplrrJ   s   &r"   r   r      r~   r$   c                 .    \         P                  ! V 4      # r   r   flipudrJ   s   &r"   r   r      r~   r$   c                 .    \         P                  ! V 4      # r   )r   fliprJ   s   &r"   r   r      r#   r$   c                 .    \         P                  ! W4      # r   r   logspacestartstops   &&r"   	logspace2r      s    ;;u##r$   c                 2    \         P                  ! WVR 7      # numr   r   r   r   s   &&&r"   	logspace3r      s    ;;u,,r$   c                 .    \         P                  ! W4      # r   r   	geomspacer   s   &&r"   
geomspace2r      s    <<$$r$   c                 2    \         P                  ! WVR 7      # r   r   r   s   &&&r"   
geomspace3r      s    <<--r$   c                 .    \         P                  ! V 4      # r   r   rot90rJ   s   &r"   r   r      r)   r$   c                 .    \         P                  ! W4      # r   r   )r0   ks   &&r"   rot90_kr          88A>r$   c                 2    \         P                  ! WVR 7      # r<   )r   array_splitr0   indicesr>   s   &&&r"   r   r      s    >>!400r$   c                 2    \         P                  ! WVR 7      # r<   )r   splitr   s   &&&r"   r   r      s    88AT**r$   c                 .    \         P                  ! W4      # r   )r   vsplitr0   
ind_or_secs   &&r"   r   r          99Q##r$   c                 .    \         P                  ! W4      # r   )r   hsplitr   s   &&r"   r   r      r   r$   c                 .    \         P                  ! W4      # r   )r   dsplitr   s   &&r"   r   r      r   r$   c                 2    \         P                  ! WVR 7      # mode)r   	correlater0   ra   r   s   &&&r"   r   r      s    <<4((r$   c                 2    \         P                  ! WVR 7      # r   )r   convolver   s   &&&r"   r   r      s    ;;q$''r$   c                 .    \         P                  ! V 4      # r   r   triNs   &r"   tri_nr      s    66!9r$   c                 .    \         P                  ! W4      # r   r   )r   Ms   &&r"   tri_n_mr          66!<r$   c                 .    \         P                  ! W4      # r   r   )r   r   s   &&r"   tri_n_kr      r   r$   c                 0    \         P                  ! WV4      # r   r   )r   r   r   s   &&&r"   	tri_n_m_kr      s    66!?r$   c                 .    \         P                  ! V 4      # r   r   trilms   &r"   tril_mr      r#   r$   c                 .    \         P                  ! W4      # r   r   r   r   s   &&r"   tril_m_kr      rO   r$   c                 .    \         P                  ! V 4      # r   r   tril_indicesrM   s   &r"   tril_indices_nr      ry   r$   c                 .    \         P                  ! W4      # r   r   rM   r   s   &&r"   tril_indices_n_kr      rb   r$   c                 0    \         P                  ! WR 7      # r   r   rM   r   s   &&r"   tril_indices_n_mr          ??1""r$   c                 0    \         P                  ! WV4      # r   r   rM   r   r   s   &&&r"   tril_indices_n_k_mr         ??1##r$   c                 .    \         P                  ! V 4      # r   r   tril_indices_fromr@   s   &r"   tril_indices_from_arrr         $$r$   c                 .    \         P                  ! W4      # r   r   r@   r   s   &&r"   tril_indices_from_arr_kr   	      ''r$   c                 .    \         P                  ! V 4      # r   r   triur   s   &r"   triu_mr    r#   r$   c                 .    \         P                  ! W4      # r   r  r   s   &&r"   triu_m_kr    rO   r$   c                 .    \         P                  ! V 4      # r   r   triu_indicesr   s   &r"   triu_indices_nr    ry   r$   c                 .    \         P                  ! W4      # r   r	  r   s   &&r"   triu_indices_n_kr    rb   r$   c                 0    \         P                  ! WR 7      # r   r	  r   s   &&r"   triu_indices_n_mr    r   r$   c                 0    \         P                  ! WV4      # r   r	  r   s   &&&r"   triu_indices_n_k_mr  !  r   r$   c                 .    \         P                  ! V 4      # r   r   triu_indices_fromr   s   &r"   triu_indices_from_arrr  %  r   r$   c                 .    \         P                  ! W4      # r   r  r   s   &&r"   triu_indices_from_arr_kr  )  r  r$   c                 0    \         P                  ! WV4      # r   )r   vander)r!   r   
increasings   &&&r"   r  r  -  s    99Q:&&r$   c                 .    \         P                  ! W4      # r   )r   	partitionr0   kths   &&r"   r  r  1  s    <<r$   c                 .    \         P                  ! W4      # r   )r   argpartitionr  s   &&r"   r   r   5  s    ??1""r$   c                 2    \         P                  ! WW#V4      # r   )r   cov)r   yrowvarbiasddofs   &&&&&r"   r"  r"  9  s    66!d++r$   c                 0    \         P                  ! WV4      # r   )r   corrcoef)r!   r#  r$  s   &&&r"   r(  r(  =  s    ;;qV$$r$   c                 0    \         P                  ! WV4      # r   )r   ediff1d)aryto_endto_begins   &&&r"   r*  r*  A  s    ::c8,,r$   c                 .    \         P                  ! W4      # r   )r   roll)r0   shifts   &&r"   r/  r/  E  s    771r$   c                 .    \         P                  ! V 4      # r   r   asarrayrJ   s   &r"   r3  r3  I      ::a=r$   c                 0    \         P                  ! WR 7      # dtyper2  r0   r8  s   &&r"   asarray_kwsr:  M  s    ::a%%r$   c                 0    \         P                  ! WR 7      # r6  r   asfarrayr9  s   &&r"   r=  r=  Q  s    ;;q&&r$   c                 .    \         P                  ! V 4      # r   r<  rJ   s   &r"   asfarray_default_kwargr?  U  rT   r$   c                 .    \         P                  ! W4      # r   )r   extract)	conditionr@   s   &&r"   rA  rA  Y  s    ::i%%r$   c                 .    \         P                  ! V 4      # r   r   trapzr#  s   &r"   np_trapzrG  ]  r)   r$   c                 .    \         P                  ! W4      # r   rD  r#  r!   s   &&r"   
np_trapz_xrJ  a  r   r$   c                 0    \         P                  ! WR 7      # dxrD  r#  rN  s   &&r"   np_trapz_dxrP  e  s    88Ar$   c                 0    \         P                  ! WV4      # r   rD  r#  r!   rN  s   &&&r"   np_trapz_x_dxrS  i  s    88A"r$   c                 .    \         P                  ! V 4      # r   r   	trapezoidrF  s   &r"   np_trapezoidrW  m  rv   r$   c                 .    \         P                  ! W4      # r   rU  rI  s   &&r"   np_trapezoid_xrY  q      <<r$   c                 0    \         P                  ! WR 7      # rL  rU  rO  s   &&r"   np_trapezoid_dxr\  u  s    <<!!r$   c                 0    \         P                  ! WV4      # r   rU  rR  s   &&&r"   np_trapezoid_x_dxr^  y  s    <<b!!r$   c                 2    \         P                  ! WW#V4      # r   )r   allcloser   s   &&&&&r"   np_allclosera  }  s    ;;qT33r$   c                 2    \         P                  ! WVR 7      # )r>   rW   )r   average)r0   r>   rW   s   &&&r"   
np_averagere    s    ::aG44r$   c                 0    \         P                  ! WV4      # r   )r   interp)r!   xpfps   &&&r"   rg  rg    s    99QBr$   c                 .    \         P                  ! W4      # r   )r   repeatr0   repeatss   &&r"   	np_repeatrn    s    99Q  r$   c                 L    \         P                  ! V 4      P                  V4      # r   )r   r3  rk  rl  s   &&r"   array_repeatrp    s    ::a=((r$   c                 2    \         P                  ! WVR 7      # ))defaultr   select)condlist
choicelistrr  s   &&&r"   	np_selectrw    s    99X7;;r$   c                 .    \         P                  ! W4      # r   rs  )ru  rv  s   &&r"   np_select_defaultsry    s    99X**r$   c                 .    \         P                  ! V 4      # r   )r   bartlettr   s   &r"   np_bartlettr}    rT   r$   c                 .    \         P                  ! V 4      # r   )r   blackmanr|  s   &r"   np_blackmanr    rT   r$   c                 .    \         P                  ! V 4      # r   )r   hammingr|  s   &r"   
np_hammingr    r4  r$   c                 .    \         P                  ! V 4      # r   )r   hanningr|  s   &r"   
np_hanningr    r4  r$   c                 .    \         P                  ! W4      # r   )r   kaiser)r   betas   &&r"   	np_kaiserr    s    99Qr$   c                 .    \         P                  ! W4      # r   )r   crossr/   s   &&r"   np_crossr    r   r$   c                 .    \         P                  ! W4      # r   )r   
trim_zeros)r0   trims   &&r"   np_trim_zerosr    s    ==!!r$   c                     \        W4      # r   r   r/   s   &&r"   
nb_cross2dr    s    1=r$   c                 .    \         P                  ! V 4      # r   r   rJ   s   &r"   flip_lrr    r~   r$   c                 .    \         P                  ! V 4      # r   r   rJ   s   &r"   flip_udr    r~   r$   c                 .    \         P                  ! W4      # r   )r   union1dr/   s   &&r"   
np_union1dr    s    ::a?r$   c                 .    \         P                  ! W4      # r   )r   asarray_chkfiniter9  s   &&r"   np_asarray_chkfiniter    s    ))r$   c                 2    \         P                  ! WW#R 7      # periodr   unwrap)pdiscontr>   r  s   &&&&r"   r  r    s    99Q55r$   c                 .    \         P                  ! V 4      # r   r  )r  s   &r"   unwrap1r    r~   r$   c                 0    \         P                  ! WR 7      # r  r  )r  r  s   &&r"   unwrap13r    s    99Q&&r$   c                 2    \         P                  ! WVR 7      # )r  r  r  )r  r  r  s   &&&r"   	unwrap123r    s    99Qw77r$   c                 
    W9   # r    )r0   keys   &&r"   array_containsr    s	    8Or$   c                 0    \         P                  ! WV4      # r   )r   swapaxes)r0   a1a2s   &&&r"   r  r    s    ;;qb!!r$   c                 0    \         P                  ! WV4      # r   )r   moveaxis)r0   sourcedestinations   &&&r"   r  r    s    ;;q+..r$   c                 4    \         P                  ! WW#VR 7      # )copynanposinfneginf)r   
nan_to_num)Xr  r  r  r  s   &&&&&r"   r  r    s    ==3fMMr$   c                 .    \         P                  ! V 4      # r   )r   r   )
dimensionss   &r"   
np_indicesr    s    ::j!!r$   c                 .    \         P                  ! V 4      # r   r   diagflat)ra   s   &r"   	diagflat1r    rT   r$   c                 .    \         P                  ! W4      # r   r  )ra   r   s   &&r"   	diagflat2r        ;;qr$   c                 .    \         P                  ! W4      # r   r   setxor1dr/   s   &&r"   np_setxor1d_2r    r  r$   c                 0    \         P                  ! WV4      # r   r  r8   s   &&&r"   np_setxor1d_3r    s    ;;q]++r$   c                 .    \         P                  ! W4      # r   r   	setdiff1dr/   s   &&r"   np_setdiff1d_2r    rZ  r$   c                 0    \         P                  ! WV4      # r   r  r8   s   &&&r"   np_setdiff1d_3r    s    <<m,,r$   c                 .    \         P                  ! W4      # r   r   in1dr/   s   &&r"   	np_in1d_2r    rO   r$   c                 2    \         P                  ! WVR 7      # r9   r  r8   s   &&&r"   
np_in1d_3ar  	      771}55r$   c                 2    \         P                  ! WVR 7      # invertr  r0   r1   r  s   &&&r"   
np_in1d_3br        771''r$   c                 0    \         P                  ! WW#4      # r   r  r0   r1   r9   r  s   &&&&r"   	np_in1d_4r        771//r$   c                 .    \         P                  ! W4      # r   r   isinr/   s   &&r"   	np_isin_2r    rO   r$   c                 2    \         P                  ! WVR 7      # r  r  r8   s   &&&r"   
np_isin_3ar    r  r$   c                 2    \         P                  ! WVR 7      # r  r  r  s   &&&r"   
np_isin_3br    r  r$   c                 0    \         P                  ! WW#4      # r   r  r  s   &&&&r"   	np_isin_4r  !  r  r$   c                   ~
  a a ] tR tRt oRtV 3R ltRR ltR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R  t"R! t#R" t$R# t%R$ t&R% t'R& t(R' t)R( t*R) t+R* t,R+ t-R, t.R- t/R. t0R/ t1R0 t2R1 t3R2 t4R3 t5RR4 lt6R5 t7R6 t8R7 t9R8 t:R9 t;R: t<R; t=R< t>R= t?]@R> 4       tAR? tBR@ tCRA tDRB tERC tFRD tGRE tHRF tIRG tJRRH ltKRI tLRJ tMRK tNRL tORM tPRN tQRO tRRP tSRQ tTRR tURS tVRT tWRU tXRV tYRW tZRX t[RY t\RZ t]R[ t^R\ t_R] t`R^ taR_ tbR` tcRa tdRb teRc tfRd tgRe thRf tiRg tjRh tkRi tlRj tmRk tnRl to]pRm 4       tqRn tr]pRo 4       ts]pRp 4       tt]pRq 4       tu]pRr 4       tvRs tw]pRt 4       tx]pRu 4       ty]pRv 4       tz]pRw 4       t{Rx t|Ry t}Rz t~R{ tR| tR} tR~ tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t]EP6                  ! ]R4      R 4       t]EP<                  ! ]R8  R4      ]3R l4       t]EP6                  ! ]R4      R 4       t]EP<                  ! ]R8  R4      ]3R l4       t]EP6                  ! ]R4      R 4       t]EP<                  ! ]R8  R4      ]EPL                  ! R4      ]3R l4       4       t]EP6                  ! ]R4      R 4       t]EP<                  ! ]R8  R4      ]3R l4       t]EP6                  ! ]R4      R 4       t]EP<                  ! ]R8  R4      ]3R l4       t]EP6                  ! ]R4      R 4       t]EP<                  ! ]R8  R4      ]3R l4       tR tR tR tR tR tR tR tR tR tR tR tR tR t]EP<                  ! ];'       d    ]R4      R 4       tR tR tR tR tR tR tR tR tR t]R 4       tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t]@R 4       tR tR tR t]@R 4       tR tR tR t]@R 4       t]EP<                  ! ]R8  R4      R 4       t]EP<                  ! ]R8  R4      R 4       t]EP<                  ! ]R8  R4      R 4       t]EP<                  ! ]R8  R4      R 4       t]EP<                  ! ]R8  R4      R 4       t]R 4       t]@R 4       t]@R 4       tR t]R 4       t]R 4       t]R 4       tR Et R EtREtVEtV ;Et# )TestNPFunctionsi%  z$
Tests for various Numpy functions.
c                t   < \         \        V `  4        \        P                  P                  ^*4      V n        R# )*   N)superr  setUpr   randomRandomStaternd)self	__class__s   &r"   r  TestNPFunctions.setUp*  s&    ot*,99((,r$   c                   \        W#4       F  w  rVf   R
.;rE\        WE4       F  w  r\        V	3V,           4      ! V4      pV! V
.VO5!  pV! V
.VO5!  p V	P                  pV\        P
                  \        P                  39   d   RMRpRV
: RV: 2pV P                  ! W3RVRVRVR	V/VB  K  	  K  	  R#   \         d    T	p Lgi ; i)a  
Runs tests for a unary function operating in the numerical real space.

Parameters
----------
pyfunc : a python function definition holding that calls the numpy
         functions to be tested.
x_types: the types of the values being tested, see numba.types
x_values: the numerical values of the values to be tested
func_extra_types: the types of additional arguments to the numpy
                  function
func_extra_args:  additional arguments to the numpy function
ignore_sign_on_zero: boolean as to whether to allow zero values
with incorrect signs to be considered equal
prec: the required precision match, see assertPreciseEqual

Notes:
------
x_types and x_values must have the same length

Nsingledoublez
for input z with prec precmsgignore_sign_on_zeroabs_tolr  )zipr   r8  AttributeErrorr	   float32	complex64assertPreciseEqual)r  pyfuncx_typesx_valuesfunc_extra_typesfunc_extra_argsr  r  kwargstxvxxtypesxargscfuncgotexpectedscaltyr  r  s   &&&&&&&&,          r"   	run_unaryTestNPFunctions.run_unary.  s   0 ',FB&68T9 !$%5!GbUV^-f5B''!"-u- XXF "emmU__%EE !%  68>'' C-1C,/C =PC 18	C <B	C "H - &  F s   B;;C
Cc                <  a aaa	 RoRo	\         oVVV V	3R lp. ROp\        '       d   \        P                  .M\        P                  \        P                  .pV\        V4      \        V4      ,          ^,           ,          pV! WB4       \        P                  ! V\        P                  R7      .pV Uu. uF  p\        V4      NK  	  ppV! WB4       . ROp\        '       d   \        P                  .M\        P                  \        P                  .pV\        V4      \        V4      ,          ^,           ,          pV! WB^R7       \        P                  ! V\        P                  R7      .pV Uu. uF  p\        V4      NK  	  ppV! WB^R7       R# u upi u upi )	z^
Tests the sinc() function.
This test is purely to assert numerical computations are correct.
Tepsc                 8   < SP                   ! SW3R SRS/VB  R# )r  r  N)r  )r  r  r  isozr  r  tols   &&,r"   check(TestNPFunctions.test_sinc.<locals>.checkw  s+    NN67 %/3%=@%#%r$   r7  )ulpsN)
      ?                           ?         g#B;g#B)      ?                                      r/                ?y                    ?                            ?      ?                  @      @            y#B;        y#B        y        #B;y        #B)r   r   r	   float64r
  lenr   arrayr   
complex128r  )
r  r"  r  
real_typesr  ra   complex_typesr   r  r!  s
   f      @@@r"   	test_sincTestNPFunctions.test_sinc[  sM     	% 	% I( }}o!MM5==9 	 HZ @1 DEg  HHXRZZ89&./h6!9h/g  ,O  **+$0@0@A 	  3x=C4F#F#JKga( HHXR]];<&./h6!9h/ga(% 0" 0s   5F2Fc                "   \         p\        R R7      ! V4      pV P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P	                  R\        XP                  4      4       V P                  4        R#   + '       g   i     LG; i)TnopythonstrNz+Argument "x" must be a Number or array-like)r   r   assertRaisesr   assertInrB  	exceptiondisable_leak_checkr  r  r  raisess   &   r"   test_sinc_exceptions$TestNPFunctions.test_sinc_exceptions  si    T"6*{++v%L ,C&**+	- 	! ,+   	A>>B	c                    R  p\         p\        RR7      ! V4      pV! 4        F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )c               3   |  "   \         P                  ! ^
^24      p ^pW3x  \         P                  ! ^4      p^
pW#3x  \         P                  ! ^.4      p^p^pWE3x  WF3x  \         P                  ! . 4      pWv3x  \         P                  ! RR.4      pVR3x  W3x  \         P                  P                  ^4       \         P                  P                  ^
4      p	\         P                  P                  ^4       \         P                  P                  4       p
V	^ ,          pW3x  W3x  V	P                  \         P                  4      pW^ ,          3x  W3x  \         P                  P                  ^4       \         P                  P                  ^
^\         P                  R7      pV^3x  V^3x  R# 5i)
   TF)sizer8  N)r   aranger3  r9  r  seedrandviewr:  randintuint8)a_0k_0a_1k_1single_val_ak_ink_out	empty_arrbool_arr	float_arrrand_k	present_k
complx_arruint_arrs                 r"   arrs+TestNPFunctions.test_contains.<locals>.arrs  sj    ))B#CC(N))A,CC(N::rd+LDE$$%%

2I"" xxu.HD. -IINN1		r*IIINN1YY^^%F!!I##&&"6Jm++$$IINN1yy(("BHH(EHA+B,s   F:F<Tr@  N)r  r   r  )r  rd  r  r  r@   r  r  receiveds   &       r"   test_containsTestNPFunctions.test_contains  sM    +	Z  T"6*HCc'HSH##H7	 r$   c                N  a aa \         o\        oVVV 3R lp. ROp\        '       d   \        P                  .M\        P
                  \        P                  .pV\        V4      \        V4      ,          ^,           ,          pV! WB4       \        P                  ! V\        P                  R7      .pV Uu. uF  p\        V4      NK  	  ppV! WB4       . ROp\        '       d   \        P                  .M\        P                  \        P                  .pV\        V4      \        V4      ,          ^,           ,          pV! WB4       \        P                  ! V4      p\        '       d   \        P                  .M\        P                  \        P                  .pV! WB4       R# u upi )z_
Tests the angle() function.
This test is purely to assert numerical computations are correct.
c                    < SP                  SW4       RR.p\        P                  3.\        V4      ,          pSP                  SWVVR7       R# )T)r  r  NTF)r  r	   bool_r8  )r  r  xtra_values
xtra_typespyfunc1pyfunc2r  s   &&  r"   r"  )TestNPFunctions.test_angle.<locals>.check  sN    NN7G6"H-K ;;.)C,<<JNN7G,6+6  9r$   r7  N)r%  r&  r'  r(  r)  r*  r+  r,  )r-  r.  r/  r/  r0  y             r1  r2  r3  r4  r5  r6  )r(   r,   r   r	   r7  r
  r8  r   r9  r   r:  r  )	r  r"  r  r;  r  ra   r<  rp  rq  s	   f      @@r"   
test_angleTestNPFunctions.test_angle  sC   
 	9 :( }}o!MM5==9 	 HZ @1 DEg  HHXRZZ89&./h6!9h/g A ,O  **+$0@0@A 	  3x=C4F#F#JKg  88H%%o $$%%*:*:; 	 	g # 0s   5F"c                    R  pTp. ROp. ROp\        W44       FQ  w  rV\        P                  ! V.VR7      p\        RR7      ! V4      pV! V4      p	V! V4      p
V P	                  W4       KS  	  R# )c                 F    \         P                  ! V 4      pVP                  # r   )r   r'   r8  )r!   rs   & r"   numba_angle;TestNPFunctions.test_angle_return_type.<locals>.numba_angle  s    A77Nr$   r7  Tr@  N)r%  r&  r-  r6  )f4f8c8c16)r  r   r9  r   assertEqual)r  rx  r  r  r  valtypr!   r  r  r  s   &          r"   test_angle_return_type&TestNPFunctions.test_angle_return_type  sj    	 .+H.HC#c*A&v.EayH(CX+ /r$   c                "   \         p\        R R7      ! V4      pV P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P	                  R\        XP                  4      4       V P                  4        R#   + '       g   i     LG; i)Tr@  helloNz0Argument "z" must be a complex or Array[complex])r(   r   rC  r   rD  rB  rE  rF  rG  s   &   r"   test_angle_exceptions%TestNPFunctions.test_angle_exceptions  si    T"6*{++v'N ,H&**+	- 	! ,+rK  c                    R  p\         p\        RR7      ! V4      pV! 4        F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )c               3   .  "   \         P                  ! . 4      \         P                  ! . 4      3x  \         P                  ! ^^.4      \         P                  ! ^^.4      3x  \         P                  ! . 4      \         P                  ! ^.4      3x  \         P                  ! ^
4      P                  ^^4      p ^V ^,          ^&   \         P                  ! ^
4      P                  ^^4      V 3x  W 3x  Rx  Rx  Rx  Rx  Rx  Rx  Rx  R	x  R# 5i)
   Nr        r  r  r  )r  r  )TTTF)Tr  )Tr  )Fr   r   r9  rP  reshaper    s    r"   arrays0TestNPFunctions.test_array_equal.<locals>.arrays(  s     ((2,,,((Aq6"BHHaV$444((2,!--		"%%a+AAaDG))B-''1-q00$J&&JJMMNs   DDTr@  N)r.   r   r  r  r  r  r  r@   rF   r  r  s   &       r"   test_array_equal TestNPFunctions.test_array_equal'  sL    	" T"6*HCc'H/C##H2 !r$   c                L   \         p\        R R7      ! V4      pV P                  \        4      ;_uu_ 4       pV! \        P
                  ! ^4      P                  ^^4      R4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)Tr@  Nz3Both arguments to "array_equals" must be array-like)
r.   r   rC  r   r   rP  r  rD  rB  rE  rG  s   &   r"   test_array_equal_exception*TestNPFunctions.test_array_equal_exceptionA  st    T"6*{++v"))E"**1a0$7 ,A  !	
 ,+s   .BB#	c                "   R  p\         p\        RR7      ! V4      pV! 4        Fh  w  rE\        V\        4      '       d   \	        V4      p\        V\        4      '       d   \	        V4      pV! WE4      pV! WE4      pV P                  Wg4       Kj  	  R# )c               3     "   \         P                  ! \        P                  4      \         P                  ! \        P                  4      3x  ^.\         P                  ! \        P                  4      3x  \         P                  ! \        P                  4      ^.3x  ^.^.3x  ^.^.3x  ^^.^.3x  . RO^^.3x  ^^.^^.3x  . RO. RO3x  . RO. RO3x  . RO. RO3x  R# 5ir  Nr  r  r  r  r+     r  r  r     r  r  r+  )r+  r+  r  r  r  )r  r  r  r  r  r  r+  r
   
empty_listr	   r7  r  r$   r"   r  2TestNPFunctions.test_intersect1d_2.<locals>.arraysN       ??5==1??5==13 3#tu}}555//%--01#55#s(N#s(Na&1#+aV##a&1a&. Y&& //!#888   C*C,Tr@  N)r6   r   
isinstancelistr
   r  r  r  r  r  r0   r1   r  r  s   &       r"   test_intersect1d_2"TestNPFunctions.test_intersect1d_2L  sy    	9  T"6*HDA !T""G!T""Ga|H+C##H2 r$   c                0   R  p\         p\        RR7      ! V4      pV! 4        F  w  rE\        V\        4      '       d   \	        V4      p\        V\        4      '       d   \	        V4      pV! WERR7      pV! WERR7      pV P                  Wg4       \        \        P                  ! V4      4      \        V4      8X  g   K  \        \        P                  ! V4      4      \        V4      8X  g   K  V! WERR7      pV! WERR7      pV P                  Wg4       K  	  R# )c               3     "   \         P                  ! \        P                  4      \         P                  ! \        P                  4      3x  ^.\         P                  ! \        P                  4      3x  \         P                  ! \        P                  4      ^.3x  ^.^.3x  ^.^.3x  ^^.^.3x  . RO^^.3x  ^^.^^.3x  . RO. RO3x  . RO. RO3x  . RO. RO3x  R# 5ir  r  r  r$   r"   r  2TestNPFunctions.test_intersect1d_3.<locals>.arraysn  r  r  Tr@  Fr  N)	r:   r   r  r  r
   r  r8  r   uniquer  s   &       r"   test_intersect1d_3"TestNPFunctions.test_intersect1d_3l  s    	9  T"6*HDA!T""G!T""Ga%8HE2C##H2299Q< CF*s299Q</@CF/J!!d;A5''6 r$   c                6   \         p\        V4      p\        P                  ! ^.4      p\        P                  ! ^.4      pV P	                  4        V P                  \        4      ;_uu_ 4        V! W4R4       RRR4       V P                  \        4      ;_uu_ 4        V! RVR4       RRR4       V P                  \        4      ;_uu_ 4        V! VRR4       RRR4       R#   + '       g   i     Lr; i  + '       g   i     LU; i  + '       g   i     R# ; ir  fooNT)r:   r   r   r9  rF  rC  r   r  	np_pyfunc	np_nbfuncr0   r1   s   &    r"   test_intersect1d_errors'TestNPFunctions.test_intersect1d_errors      !	O	HHaSMHHaSM!{++aE" ,{++eQ% ,{++a% ,+	 ,++++++$   -
C!C4D!C1	4D	D	c                    R  p\         p\        RR7      ! V4      pV! 4        F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )c               3     "   \         P                  ! . 4      R 3x  \         P                  ! ^
4      R 3x  \         P                  ! ^
4      R 3x  \         P                  ! ^
\         P
                  R7      ^ 3x  \         P                  ! ^<4      P                  ^^^4      R 3x  \         P                  ! ^4      P                  ^^4      ^ 3x  \         P                  ! ^4      P                  ^^4      ^3x  R # 5i)Nr7  )r   r9  zerosrP  onesrm  r  r  r$   r"   r  2TestNPFunctions.test_count_nonzero.<locals>.arrays  s     ((2,$$((2,$$))B-%%''"BHH-q00))I&..q!Q7==))E"**1a0!33))E"**1a0!33s   C:C<Tr@  N)rC   r   r  )r  r  r  r  r@   r>   r  r  s   &       r"   test_count_nonzero"TestNPFunctions.test_count_nonzero  sM    	4 T"6*ICc(H"C##H2 "r$   c                    R  p\         p\        RR7      ! V4      pV! 4        F)  w  rEpV! WEV4      pV! WEV4      pV P                  Wx4       K+  	  R# )c               3     "   Rx  \         P                  ! ^
4      ^R3x  \         P                  ! ^
4      \         P                  ! ^4      R3x  \         P                  ! ^
4      P                  ^^4      \         P                  ! ^4      R3x  \         P                  ! . RO. RO.4      \         P                  ! . RO.4      ^ 3x  \         P                  ! . RO. RO.4      p W ^3x  R# 5i)r  N)r  r  Nr  r  r+     r     	   r   rP  r  r9  r   s    r"   r  .TestNPFunctions.test_np_append.<locals>.arrays  s     ))B-D(())B-1t33))B-''1-ryy|TAA((Iy12BHHi[4I1LL((Iy12CA+r  Tr@  N)r?   r   r  )	r  r  r  r  r@   rF   r>   r  r  s	   &        r"   test_np_appendTestNPFunctions.test_np_append  sS    	 T"6*$hNCdc-H$'C##H2 'r$   c                2   \         p\        R R7      ! V4      p\        P                  ! . RO. R	O.4      p\        P                  ! . R
O.4      p^ pV P	                  \
        4      ;_uu_ 4       pV! RWE4       RRR4       V P                  R\        XP                  4      4       V P	                  \
        4      ;_uu_ 4       pV! VRV4       RRR4       V P                  R\        VP                  4      4       V P	                  \
        4      ;_uu_ 4       pV! W4RR7       RRR4       V P                  R\        VP                  4      4       V P                  4        R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lm; i)Tr@  Nz+The first argument "arr" must be array-likez/The second argument "values" must be array-liker'  r=   z,The third argument "axis" must be an integerr  r  r  )
r?   r   r   r9  rC  r   rD  rB  rE  rF  )r  r  r  r@   rA   r>   rH  s   &      r"   test_np_append_exceptions)TestNPFunctions.test_np_append_exceptions  s,   T"6*hh	9-.9+& {++v$% ,9  !	
 {++v#tT" ,=  !	
 {++v#C( ,:  !	

 	!/ ,+ ,+ ,+s$   -
E E3F E0	3F	F	c                    R  p\         p\        RR7      ! V4      pV! 4        F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )c               3   &  "   . RO^3x  . RO^^.3x  \         P                  ! ^
4      ^3x  \         P                  ! ^
4      R3x  \         P                  ! ^
4      . RO3x  \         P                  ! ^
4      . RO3x  \         P                  ! ^<4      P                  ^^^4      ^3x  \         P                  ! ^<4      P                  ^^^4      . RO3x  . RO\        ^^^4      3x  \         P                  ! ^
4      \        ^
4      3x  R# 5i)r  Nr  r  r  r  r+  )r  r+  r  )r  r  r  r+  )r+        r  r  r  r  r  )r   rP  r  slicer  r$   r"   r  +TestNPFunctions.test_delete.<locals>.arrays  s      "1$$!Aq6))))B-""))B-##))B-**))B---))I&..q!Q7::))I&..q!Q7GGaA..))B-r**s   DDTr@  N)rE   r   r  r  s   &       r"   test_deleteTestNPFunctions.test_delete  sL    	+( T"6*HCc'H/C##H2 !r$   c                   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! ^^.R4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^
4      . RO4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^.^4       RRR4       V P                  R\        VP                  4      4       V P                  4        R#   + '       g   i     EL\; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i)Tr@  gQ	@Nzobj should be of Integer dtypez)arr must be either an Array or a Sequencez"obj must be less than the len(arr))g      @gffffff@g@)rE   r   rF  rC  r   rD  rB  rE  r   rP  
IndexErrorrG  s   &   r"   test_delete_exceptions&TestNPFunctions.test_delete_exceptions   sk   T"6*!{++v1a&$ ,,  !	

 {++v"))B-1 ,,  !	

 {++v!QK ,7  !	

 z**f1a&! +0  !	

 	!9 ,++ ,++ ,+ +*s0   F% F9
GG %F6	9G
	G	 G0	c              #     "   \         P                  ! ^4      ^,          pVx  VP                  R4      pVx  \         P                  ! ^4      P                  R4      ^,          pVx  R# 5i)z 
Some test arrays for np.diff()
Nr  r  )r  r  r  r   rP  r  r  r0   r1   cs   &   r"   diff_arraysTestNPFunctions.diff_arrays#  sS      IIbMQIIfIIbM!!),1s   A)A+c                L   \         p\        R R7      ! V4      pV P                  4        F$  pV! V4      pV! V4      pV P                  WE4       K&  	  \        P
                  ! ^*4      pV P                  4       ;_uu_ 4        V! V4       RRR4       R#   + '       g   i     R# ; iTr@  N)rK   r   r  r  r   r9  assertTypingError)r  r  r  r@   r  r  r0   s   &      r"   
test_diff1TestNPFunctions.test_diff1.  s}    T"6*##%Cc{H*C##H2 & HHRL##%%!H &%%%s   ?	BB#	c           	        \         p\        R R7      ! V4      pV P                  4        FU  pVP                  R,          p^ ^^^V^,
          WD^,           R3 F$  pV! W54      pV! W54      pV P	                  Wg4       K&  	  KW  	  R# )Tr@  i  N)rN   r   r  shaper  )r  r  r  r@   rO  rM   r  r  s   &       r"   
test_diff2TestNPFunctions.test_diff2;  sx    T"6*##%C99R=DAq$(D(C@!#>Cm''6 A &r$   c                &   \         p\        R R7      ! V4      pV P                  4        \        P                  ! ^*4      pV P                  4       ;_uu_ 4        V! V^4       RRR4       \        P                  ! ^
4      pR FV  pV P                  \        4      ;_uu_ 4       pV! W44       RRR4       V P                  R\        XP                  4      4       KX  	  V P                  4        R#   + '       g   i     L; i  + '       g   i     L^; i)Tr@  Nzorder must be non-negative)r  i)rN   r   rF  r   r9  r  rP  rC  
ValueErrorrD  rB  rE  )r  r  r  r@   rM   rH  s   &     r"   test_diff2_exceptions%TestNPFunctions.test_diff2_exceptionsE  s    T"6* 	! hhrl##%%#qM & iimA"":..&c /MM6F<L<L8MN 
 	! &% /.s   
C-!	D -C=	 Dc                    R  p\         p\        RR7      ! V4      pV! 4        F%  pV! V4      pV! V4      pV P                  WVV4       K'  	  R# )c               3   V  "   ^x  \         P                  ! ^.4      x  R	x  Rx  Rx  \        ^
4      x  \         P                  ! R4      x  Rx  Rx  Rx  \         P                  ! ^
R4      x  \         P
                  ! R4      x  \         P
                  ! ^R4      x  R# 5i)
r                @numbai90  gV-@TNYnat)r  )r   r3  intint16timedelta64
datetime64r  r$   r"   rA   -TestNPFunctions.test_isscalar.<locals>.values[  s     G**aS/!JHMb'M((5/!KJJ..S))--&&--3''s   B'B)Tr@  N)r{   r   r~  r  rA   r  r  r!   r  r  s   &      r"   test_isscalarTestNPFunctions.test_isscalarZ  sK    	( T"6*AayH(CXA. r$   c                   R  p\        RR7      R 4       p\        \        .pV F  p\        RR7      ! V4      pV! 4        F  pV! V4      pV! V4      pV P                  Wx4       VP	                  VRV4      p	V! VRV4      p
V P                  W4       VP	                  VRV4      pV! VRV4      pV P                  W4       K  	  V P                  \        VP                  4      ^4       K  	  R# )c               3   Z   "   ^x  Rx  \         P                  ! . RO4      x  Rx  R# 5i)r  hello worldNr-  )r  r-  Tr2  r  r$   r"   rA   4TestNPFunctions.test_isobj_functions.<locals>.valuesr  s%     GL**.//s   )+Tr@  c                 *    V'       d   T MR pV! V4      # r   r  )r!   condr  r#  s   &&& r"   optional_fn9TestNPFunctions.test_isobj_functions.<locals>.optional_fnx  s    tA8Or$   FN)r   rx   r   r~  py_funcr8  
signatures)r  rA   r
  pyfuncsr  r  r!   r  r  expected_optionalgot_optionalexpected_nonegot_nones   &            r"   test_isobj_functions$TestNPFunctions.test_isobj_functionsq  s    	  
d		 
	  +F&v.EX!!9Ah  / %0$7$74$H!*1dE:  !2A !, 3 3Auf E&q%7  9  S!1!12A6# r$   c                    R  p\         \        .pV FD  p\        RR7      ! V4      pV! 4        F$  pV! V4      pV! V4      pV P                  Wg4       K&  	  KF  	  R# )c               3      "   \         P                  ! . RO4      x  \         P                  ! . RO4      x  ^x  Rx  Rx  Rx  Rx  \         P                  ! ^^.^^.^^.^^..4      x  R# 5i)r  y              (@N)      ?      ?r-        @r  r                 @r        ?      @y      $@        )r         @        r   r9  r  r$   r"   rA   7TestNPFunctions.test_is_real_or_complex.<locals>.values  sf     ((:;;((9%%GILM""((QFQFQFQF;<<s   A/A1Tr@  N)ru   r}   r   r  )r  rA   r  r  r  r!   r  r  s   &       r"   test_is_real_or_complex'TestNPFunctions.test_is_real_or_complex  sX    	= f%F&v.EX!!9Ah''6  r$   c                    R  p\         \        .pV FF  p\        RR7      ! V4      pV! 4        F&  w  rVV! WV4      pV! WV4      pV P                  Wx4       K(  	  KH  	  R# )c               3   \  "   \         P                  ) R 3x  \         P                  R 3x  \         P                  R 3x  \         P                  ! \         P                  ) R\         P                  .4      R 3x  \         P                  ) \         P                  ! ^\         P                  R7      3x  \         P                  \         P                  ! ^\         P                  R7      3x  \         P                  \         P                  ! ^\         P                  R7      3x  \         P                  ) \         P
                  ! ^4      3x  \         P                  ! \         P                  ) R\         P                  .4      \         P                  ! ^\         P                  R7      3x  R # 5i)Nr'  r7  )r   infr3  r  rm  emptyr  r$   r"   rA   7TestNPFunctions.test_isneg_or_ispos_inf.<locals>.values  s     66'4-&&$,&&$,**rvvgr26623T9966'288ARXX666&&"((1BHH555&&"((1BHH55566'288B<''**rvvgr26623RXXarxx5PPPs   F*F,Tr@  N)r   r   r   r  )	r  rA   r  r  r  r!   r   r  r  s	   &        r"   test_isneg_or_ispos_inf'TestNPFunctions.test_isneg_or_ispos_inf  s[    		Q X&F&v.E (!!>Am''6 # r$   c                  a	a
aaa R oRo\         P                  ! ^dR.4      o
\         P                  ! ^4      P                  R	4      o	RSRS/oV	V
VVV3R lp\        p\        RR7      ! V4      pV! 4        Fp  w  rEpV! WE3/ VB pV! WE3/ VB p\        V\         P                  4      '       d   V P                  Wx4       KK  V P                  \         P                  ! Wx4      4       Kr  	  R# )
h㈵>:0yE>  r   r   c               3     <"   R R/ 3x  R \         P                  / 3x  \         P                  ! RR.4      \         P                  ! RR.4      / 3x  \         P                  ! R R.4      \         P                  ! RR.4      / 3x  \         P                  ! R R.4      \         P                  ! RR.4      / 3x  \         P                  ! R R.4      \         P                  ! RR.4      / 3x  \         P                  ! R\         P                  .4      \         P                  ! R\         P                  .4      / 3x  \         P                  ! R\         P                  .4      \         P                  ! R\         P                  .4      RR	/3x  \         P                  ! \         P                  \         P                  .4      \         P                  ! R\         P                  .4      RR	/3x  \         P                  ! R
R.4      \         P                  ! RR.4      RR/3x  \         P                  ! RR.4      \         P                  ! RR.4      / 3x  \         P                  ! RR.4      \         P                  ! RR.4      RR/3x  \         P                  ! ^\         P                  ^.4      \         P                  ! ^\         P                  ^.4      S3x  \         P                  ! S\         P                  \         P                  ) \         P                  .4      \         P                  ! ^ .4      S3x  \         P                  ! S\         P                  \         P                  ) \         P                  .4      ^ S3x  ^ \         P                  ! S\         P                  \         P                  ) \         P                  .4      S3x  \         P                  ! ^ ^.4      \         P                  ! ^^ .4      S3x  SSS3x  \         P                  ! ^.4      \         P                  ! ^S,           S,           .4      S3x  SSSS,          ,           S3x  SSSS,          ,           S,           S3x  S S S S,          ,           S3x  \         P                  \         P                  S3x  \         P                  ) \         P                  S3x  \         P                  \         P                  ! \         P                  .4      S3x  \         P                  ! \         P                  \         P                  ) .4      \         P                  ! \         P                  \         P                  ) .4      S3x  \         P                  ! \         P                  ^ .4      \         P                  ! ^\         P                  .4      S3x  \         P                  ! \         P                  \         P                  ) .4      \         P                  ! ^^ .4      S3x  \         P                  ! \         P                  \         P                  .4      \         P                  ! ^\         P                  ) .4      S3x  \         P                  ! \         P                  \         P                  .4      \         P                  ! ^^ .4      S3x  \         P                  ! \         P                  ^ .4      \         P                  ! \         P                  \         P                  ) .4      S3x  \         P                  ! S^,          .4      \         P                  ! ^ .4      S3x  \         P                  ! ^.4      \         P                  ! ^S,           S^,          ,           .4      S3x  S S SR,          S ,          ,           SR,          ,           S3x  \         P                  ! \         P                  ! \         P                  ^.4      4      \         P                  ! \         P                  ! ^ \         P                  .4      4      S3x  \         P                  ! \         P                  ^ .4      \         P                  ! S^,          S^,          .4      S3x  \         P                  ! \         P                  ^ .4      \         P                  ! \         P                  S^,          .4      S3x  \         P                  ! S^R^^S,          ,           ,          S,           .4      \         P                  ! ^ \         P                  R.4      S3x  \         P                  ! ^4      \         P                  ! . RO4      S3x  \         P                  \         P                  ! \         P                  \         P                  \         P                  .4      S3x  \         P                  ! ^ .4      \         P                  ! S\         P                  \         P                  ) \         P                  .4      S3x  ^ \         P                  ! S\         P                  \         P                  ) \         P                  .4      S3x  R# 5i)    _B   UkBr)  Hz>r'  &.>   2٠Br%  r   T0.++r   绽|=g#B;g=|=皙?    .AN)r   r   @)r   r  r9  r"  rP  )aranr@   r   kwr   s   r"   rA   ,TestNPFunctions.test_isclose.<locals>.values  s    
B&&""((D$<("((C:*>BB((D$<("((J3E*FJJ((D$<("((J3E*FJJ((D$<("((It3D*ErII((C=)288S"&&M+BBFF((C=)288S"&&M+B[RVDWWW((BFFBFF+,bhhRVV}.EUYGZZZ((FD>*BHHc3Z,@63-OO((E5>*BHHeS\,BBFF((E5>*BHHe\5J,KfVY]ZZ((Arvvq>*BHHa^,DbHH((D"&&266'266:;RXXqc]BNN((D"&&266'266:;QBBRXXtRVVbffWbff=>BB ((Aq6"BHHaV$4b88sB,((A3-1t8d?*;!<b@@sS4Z'++sS4Z'$.22td{*B..&&"&&"$$66'2662%%&&"((BFF8,b00((BFFRVVG,-rxx"&&8I/JBNN ((BFFA;'1bff+)>BB((BFFRVVG,-rxxA/?CC((BFFBFF+,bhhBFF7|.DbHH((BFFBFF+,bhh1v.>BB((BFFA;'266BFF72C)DbHH((D1H:&!r99((A3-1t8dQh+>*?!@"DDtczD004#:=rAA((288RVVQK01288BHHa[<Q3RTVVV ((BFFA;'4!8TAX2F)GKK((BFFA;'2664!82D)ErII((D!SADL%9D%@ABBHHaQSQWQWY\M]D^`bbb))A, 5r99&&"((BFFBFFBFF#;<b@@((A3-4"&&"&&*I!JBNNRXXtRVVbffWbff=>BBs   i3i6Tr@  Nr  r  r  )r   r9  rP  r  r   r   r  rm  r~  
assertTruer.   )r  rA   r  r  r0   r1   r  r  r  r6  r@   r   r7  r   s   &        @@@@@r"   test_iscloseTestNPFunctions.test_isclose  s    hhT{#yy|##I.dFD)3	C 3	Cj T"6*"HLA&a-f-H''C(BHH--  /x => %r$   c                   \         p\        R R7      ! V4      p\        P                  ! RR\        P                  .4      \        P                  ! RR.4      RRRR\
        3R	^RRRR
\        3^R	RRRR\        3^^RRRR\        3^^RRRR\        3^^RR^R\        3.pV F4  w  rErgrp
V P                  W4      ;_uu_ 4        V! WEWgV4       RRR4       K6  	  R#   + '       g   i     KK  ; iTr@  r,  r/  r0  r(  r)  Fz=shape mismatch: objects cannot be broadcast to a single shaper  z)The first argument "a" must be array-likez*The second argument "b" must be array-likez2The third argument "rtol" must be a floating pointz3The fourth argument "atol" must be a floating pointz0The fifth argument "equal_nan" must be a booleanN)r   r   r   r3  r  r  r   assertRaisesRegexr  r  r  inpsr0   r1   r   r   r   exc_msgexcs   &          r"   isclose_exception!TestNPFunctions.isclose_exception  s   T"6*ZZtRVV,-ZZD)*E5L	
 au8 u9 5%A 5%B 5%?%
. :>5A$i#''55aD	2 65 :>555s   CC+c                    . ROp\         P                  ! . RO4      pV P                  P                  ^ ^dRR7      P	                  \         P
                  4      pWV3# )z'
Some test sequences for np.bincount()
,  rO  )r  r  r+  r  r     )r+  r  r  r+  )r   r9  r  rT  astypeint8r  s   &   r"   bincount_sequences"TestNPFunctions.bincount_sequences  sK      HH]#HHQ#.55bgg>ayr$   c                    \         p\        R R7      ! V4      pV P                  4        F$  pV! V4      pV! V4      pV P                  WE4       K&  	  R# r  )rS   r   rL  r  )r  r  r  seqr  r  s   &     r"   test_bincount1TestNPFunctions.test_bincount1%  sI    T"6***,Cc{H*C##H2 -r$   c                F   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! ^R.4       RRR4       V P                  R\        XP                  4      4       V P                  4        R#   + '       g   i     LG; i)Tr@  N#first argument must be non-negativer  )rS   r   rF  rC  r  rD  rB  rE  rG  s   &   r"   test_bincount1_exceptions)TestNPFunctions.test_bincount1_exceptions-  s}    T"6* 	! z**f1b'N +;&**+	- 	! +*s   BB 	c                r   \         p\        R R7      ! V4      pV P                  4        F  pV Uu. uF   p\        P                  ! V4      ^,
          NK"  	  ppV\
        P                  ! V4      V\
        P                  ! V4      3 F$  pV! W64      pV! W64      pV P                  Wx4       K&  	  K  	  R# u upi r  )rY   r   rL  mathsqrtr   r9  r  )	r  r  r  rO  r!   rX   rW   r  r  s	   &        r"   test_bincount2TestNPFunctions.test_bincount2<  s    T"6***,C+./3a1!!3A/rxx{C#?!#/C)''6 @ -/s   &B4c                    \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! ^R.^ ^ .4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^R.^ .4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)Tr@  NrS  z+weights and list don't have the same lengthr  )rY   r   rF  rC  r  rD  rB  rE  rG  s   &   r"   test_bincount2_exceptions)TestNPFunctions.test_bincount2_exceptionsG  s    T"6* 	! z**f1b'Aq6" +;&**+	- z**f1b'A3 +C&**+	- +* +*   CC-C*	-C=	c                .   \         p\        R R7      ! V4      pV P                  4        Fh  p\        V4      pWD^,           3 FL  pV! VRV4      pV! VRV4      pV P	                  \        V4      \        V4      4       V P                  Wg4       KN  	  Kj  	  R# r  )r\   r   rL  maxr~  r8  r  )r  r  r  rO  a_maxr[   r  r  s   &       r"   test_bincount3TestNPFunctions.test_bincount3Z  s    T"6***,CHE#QY/	!#tY7Cy1  XC9''6	 0 -r$   c                    \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! ^R.^ ^ .4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^&.RR4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)Tr@  NrS  z 'minlength' must not be negativer  )r\   r   rF  rC  r  rD  rB  rE  rG  s   &   r"   test_bincount3_exceptions)TestNPFunctions.test_bincount3_exceptionsf  s    T"6* 	! z**f1b'Aq6" +;&**+	- z**f2r(D"% +8&**+	- +* +*r^  c                n  a aa	a
aaa \         o\        R R7      ! S4      o\        o\        R R7      ! S4      o	\        o\        R R7      ! S4      o
VV	V
VVVV 3R lp\        '       d\   \
        P                  ! . RO4      p\
        P                  ! . RO4      pV! W#^ ,          4       V! W#4       V! \        V4      V4       R# \
        P                  ! ^4      ^,          p\
        P                  ! ^4      ^,
          pV\        V4      3 FG  pV F  pV! WE4       K  	  W3P                  R4      3 F  pV! WE4       K  	  V! V\        V4      4       KI  	  \
        P                  ! \        V4      \        R4      .^,          ,           4      R,          p\
        P                  ! ^4      R,
          pV\        V4      3 FG  pV F  pV! WE4       K  	  W3P                  R4      3 F  pV! WE4       K  	  V! V\        V4      4       KI  	  R p\        R R7      ! V4      oS P                  4       ;_uu_ 4        S! ^^.^4       RRR4       RR lp\        R R7      ! V4      oS P                  4       ;_uu_ 4        S! ^^.^R	R
7       RRR4       \
        P                  ! . RO4      p\
        P                  ! ^^.^^.^^.^ ^..4      pV! WE4       \
        P                  ! . RO4      p\
        P                  ! ^^
.^
^.R^..4      pV! WE4       R#   + '       g   i     L; i  + '       g   i     L; i)Tr@  c                    < S! W4      pS! W4      pS
P                  W#4       S! W4      pS! W4      pS
P                  W#4       S	! W4      pS! W4      pS
P                  W#4       R # r   r  r0   ra   r  r  r  
cfunc_leftcfunc_rightr  pyfunc_leftpyfunc_rightr  s   &&  r"   r"  0TestNPFunctions.test_searchsorted.<locals>.check  g    a|H+C##H2"1(HQ"C##H2#A)Ha#C##H2r$   Nr         @r)  c                 2    \         P                  ! WR R7      # )nonsensere   r^   r`   s   &&r"   bad_side3TestNPFunctions.test_searchsorted.<locals>.bad_side  s    ??1j99r$   c                 2    \         P                  ! WVR 7      # )re   r^   )r0   ra   rf   s   &&&r"   nonconst_side8TestNPFunctions.test_searchsorted.<locals>.nonconst_side  s    ??1d33r$   ri   re   )r   r  r  )r   r  r+  r  r+  )rd   )r  r  r   )	r  r  r  r  r   r  r  r  r  r  )r_   r   rg   rj   r   r   r9  r  rP  r  r7  floatr  )r  r"  binsrA   r0   ra   rt  rw  r  rk  rl  r  rm  rn  s   f       @@@@@@r"   test_searchsorted!TestNPFunctions.test_searchsortedy  s   T"6*'$'4
)4(6	3 	3 ?88I&DXXi(F $q	"$$t*f% yy|q 2"T
#Aa  nnV45a 6 !T&\" $ zz$t*e~'99:S@2$T
#Aa  nnV45a 6 !T&\" $	:T"8,##%%1Q%O &	4T"=1##%%1Q%) & HHYHHAAAA	
 	aHH01HHBQQ
 	a= &% &%s   5L8L$L!	$L4	c                  a a	a
aaaa \         o\        R R7      ! S4      o	\        o\        R R7      ! S4      o
\        o\        R R7      ! S4      oV	V
VVVVV 3R lp\        '       dX   \
        P                  ! . R
O4      p\
        P                  ! . RO4      pV! W#4       V! \
        P                  ! V4      V4       R# \        \        R^24      4      pV\
        P                  .^,          \
        P                  .^,          ,           \
        P                  ) .^,          ,           ,          p\        R4       F  pS P                  P                  . RO4      pS P                  P                  WF4      pS P                  P                  WFV^,          ^,
          ,           4      pV! W#4       V! \
        P                  ! V4      V4       K  	  \
        P                  ! ^4      p\
        P                  ! \!        V4      \
        P                  R7      pV! Ww4       V! Wx4       V! W4       V! W4       \
        P                  ! ^	\
        P                  .\
        P"                  R7      p\
        P                  ! \
        P                  .\
        P"                  R7      pV! W#4       \
        P$                  ! ^4      p\
        P$                  ! ^ 4      pV! W#4       \
        P                  ! . RO4      p\
        P                  ! RR .4      pV! W#4       . ROpR pV! W#4       \
        P                  ! . RO4      p\
        P                  ! RR	.4      pV! W#4       R# )Tr@  c                    < S! W4      pS! W4      pS
P                  W#4       S! W4      pS! W4      pS
P                  W#4       S	! W4      pS! W4      pS
P                  W#4       R # r   ri  rj  s   &&  r"   r"  =TestNPFunctions.test_searchsorted_supplemental.<locals>.check  rp  r$   Nr*  
fill_valuer7  F24)r  r  r+  )r   r  r  r  r,  )r+  rN     )FFTTr  )1r  3)r_   r   rg   rj   r   r   r9  sortr  ranger  r"  r  choicer  fullr8  r
  rP  )r  r"  r0   ra   element_poolisample_sizer  nansr  rk  rl  r  rm  rn  s   f        @@@@@@r"   test_searchsorted_supplemental.TestNPFunctions.test_searchsorted_supplemental  sK   T"6*'$'4
)4(6	3 	3 ?#A&A!K"''!*a E"bM*1x!|3wi!mCCtA((//+6K :AQUQY.GHA !K"''!*a   wwqzwws4yRVV4d 	ddd HHa[

3HHbffXRZZ0a IIaLIIaLa HH/0HHeT]#a a HH_%HHc3Z ar$   c                  a a	a
aaaa \         o\        R R7      ! S4      o	\        o\        R R7      ! S4      o
\        o\        R R7      ! S4      oV	V
VVVVV 3R lp\        '       dX   \
        P                  ! . RO4      p\
        P                  ! RR.4      pV! W#4       V! \
        P                  ! V4      V4       R# ^ ^\
        P                  .p\        P                  ! WD4       Uu. uF  p\        V!  NK  	  pp\        ^d4       F  pS P                  P                  ^^\        V4      .4      pS P                  P                  Wh4      pS P                  P                  WhV^,          ^,
          ,           4      pV! W#4       V! \
        P                  ! V4      V4       K  	  V! \
        P                  ! V4      \
        P                   ! ^4      R7       R# u upi )Tr@  c                    < S! W4      pS! W4      pS
P                  W#4       S! W4      pS! W4      pS
P                  W#4       S	! W4      pS! W4      pS
P                  W#4       R # r   ri  rj  s   &&  r"   r"  8TestNPFunctions.test_searchsorted_complex.<locals>.check4  rp  r$   Nr`   )r-  y       @      ?      @        r  r  )r_   r   rg   rj   r   r   r9  r  r  	itertoolsr   complexr  r  r  r8  rP  )r  r"  r0   ra   poolr  r  r  r  r  rk  rl  r  rm  rn  s   f        @@@@@@r"   test_searchsorted_complex)TestNPFunctions.test_searchsorted_complex*  s_   T"6*'$'4
)4(6	3 	3 ?12A&&)*A!K"''!*a 1bff~-6->->t-JK-J-JKsA((//1a\1B*CDK :AQUQY.GHA !K"''!*a   	&"))A,7 Ls   *Gc                  a aa \         o\        R R7      ! S4      oVVV 3R lp\        P                  ! ^ R^RR^^^	R\	        R4      \	        R4      \	        R	4      34      p\        V4      ^8X  g   Q hS P                  P                  V4       \        P                  ! . RO4      p\        P                  ! ^^R^\	        R4      \	        R4      .4      p\        P                  ! ^^R^\	        R4      \	        R4      .\	        R	4      .^
,          ,           4      pW4V.pW"P                  R4      .pV F6  pVP                  4        V F  p	V! W4       V! WR
R
R1,          4       K  	  K8  	  V F(  pR F  p
V! W(V
4       V! W(R
R
R1,          V
4       K!  	  K*  	  V! \        V4      V4       V! \        P                  ! \        P                  ^.4      \        P                  ! R\        P                  .4      4       R
# )Tr@  c                  B   < S! V !  pS! V !  pSP                  W4       R # r   ri  rn   r  r  r  r  r  s   *  r"   r"  ,TestNPFunctions.test_digitize.<locals>.check^  #    t}H,C##H2r$   Gz?皙@r        #@r"  z-infr  N      ?r  r  r  r  r  r  r  )rl   r   r   r7  rz  r8  r  shuffler  r  r  r9  r  )r  r"  rA   bins1bins2bins3all_binsxsr{  r!   ri   r  r  s   f          @@r"   test_digitizeTestNPFunctions.test_digitizeZ  s   T"6*	3
 Qac1aC"5\5=%,H I6{b    

>*

Aq#q%,fFG

Aq#q%,fF#El^b01 2 %(nnV,- DIIKaadd$   D&fE*f4R4j%0 '  	d6lE" 	bhh{#RXXsBFFm%<=r$   c                l  a aa S P                  4        \        o\        R R7      ! S4      oVVV 3R lp\        P                  ! \        P
                  ^.4      p\        P                  ! \        P
                  RR\        P
                  .4      pV! W#4       . ROp. ROpV! W#4       . ROpV! W#4       R# )	Tr@  c                     < SS3 FV  pSP                  \        4      ;_uu_ 4       pV! V !   R R R 4       RpSP                  V\        XP                  4      4       KX  	  R #   + '       g   i     L=; i)Nz3bins must be monotonically increasing or decreasingrC  r  rD  rB  rE  )rn   fnrH  r  r  r  r  s   *   r"   check_errorETestNPFunctions.test_digitize_non_monotonic_bins.<locals>.check_error  sX    uo&&z22fI 3 Lc3v'7'7#89 &22s   A""A2r  ffffff@Nr  r   r  r  )r   r   r  r   r  r  r   r  )rF  rl   r   r   r9  r  )r  r  r!   r{  r  r  s   f   @@r"    test_digitize_non_monotonic_bins0TestNPFunctions.test_digitize_non_monotonic_bins  s    !T"6*	: HHbffa[!xxc26623AAAr$   c                  a aa \         o\        R R7      ! S4      oVVV 3R lp\        P                  ! R^4      p\        P                  ! R^4      pV! W#4       \        P                  ! ^RR4      p\        P                  ! ^RR4      pV! W#4       S P                  P                  ^
4      p\        P                  ! VP                  4       VP                  4       ^
4      pV! W#4       . ROp. ROpV! W#4       \        P                  ! R^4      p\        P                  ! R^4      pV! W#R 4       \        P                  ! ^RR4      p\        P                  ! ^RR4      pV! W#R 4       S P                  P                  ^
4      p\        P                  ! VP                  4       VP                  4       ^
4      pV! W#R 4       . R	Op. R
OpV! W#4       . ROpV! W#4       . ROpV! W#4       RpV! V.V^,
          V^,           .4       R# )Tr@  c                  B   < S! V !  pS! V !  pSP                  W4       R # r   ri  r  s   *  r"   r"  9TestNPFunctions.test_digitize_supplemental.<locals>.check  r  r$   Nr,  r  )r  r+  r  rN  r     r   )r  r+  rN  r  )r   r   r  )r  r  r   r  r  r  r  l          )	rl   r   r   rP  r  rR  linspaceminr`  )r  r"  r!   r{  r  r  s   f   @@r"   test_digitize_supplemental*TestNPFunctions.test_digitize_supplemental  s    T"6*	3 IIb!yyQa IIaR yyB#a HHMM"{{1557AEEGR0a $a IIb!yyQat IIaR yyB#at HHMM"{{1557AEEGR0at aaa qcAE1q5>"r$   c           	        V P                  4        \        p\        R R7      ! V4      p\        P                  ! R.4      p\        P                  ! . RO4      pRpW3 FQ  pV P                  4       ;_uu_ 4       pV! W44       V P                  V\        VP                  4      4       RRR4       KS  	  R#   + '       g   i     Kh  ; i)Tr@  zx may not be complexNr  )r%        @r         @)	rF  rl   r   r   r9  r  rD  rB  rE  )r  r  r  r!   r#  r  funcrH  s   &       r"    test_digitize_raise_if_x_complex0TestNPFunctions.test_digitize_raise_if_x_complex  s    !T"6*HHfXHH&'$MD''))VQ
c3v'7'7#89 *) ")))s   8.B44Cc                   a aaa \         o\        R R7      ! S4      oVVV 3R loV3R lp\        P                  ! R4      p\	        V4      ^8X  g   Q hS P
                  P                  V4       V! V4       R# )Tr@  c                  r   < S! V !  w  rS! V !  w  r4SP                  W4       SP                  W$R ^R7       R# )r  r  r$  Nri  )rn   pyhistpybinschistcbinsr  r  r  s   *    r"   r"  -TestNPFunctions.test_histogram.<locals>.check  s>    #T]NF $<LE##F2 ##Fq#Ir$   c                    < \         P                  ! . RO4      pS! W4       S! V P                  R4      V4       S! V ^4       S! V ^R4       S! V 4       R# )r  Nr  r  )r%  g      +@)r   r7  r  )rA   r{  r"  s   & r"   check_values4TestNPFunctions.test_histogram.<locals>.check_values  sQ     ::n-D&&..($/ &! &![) &Mr$   N)r   r  r  r  r  r  r  r  r  g     @E@r&  r(  )rp   r   r   r7  r8  r  r  )r  r  rA   r  r"  r  s   f  @@@r"   test_histogramTestNPFunctions.test_histogram  sc    T"6*	J	   7 86{b    Vr$   c                  a aa \        R R7      ! S4      oVVV 3R lp\        '       d2   Rp\        P                  \        P                  .pRR.pV! W4V4       R# Rp\        P
                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  .p. R	OpV! W4V4       \        P                  ! ^4      P                  ^^4      p\        P                  ! ^4      pWg3Wv33 FZ  w  rS P                  \        4      ;_uu_ 4       p
S! W4       RRR4       RpS P                  V\        X
P                   4      4       K\  	  R#   + '       g   i     L=; i)
Tr@  c                   < \         P                  ! WW V4       F  w  r4rVp\        P                  ! WSR 7      p\        P                  ! WdR 7      p	\        P                  ! V\        P
                  4      '       d    VRV,          ,           P                  V4      p\        P                  ! V\        P
                  4      '       d    V	RV	,          ,           P                  V4      p	S! WVR7      p
S! WVR7      pSP                  W4       K  	  R# )r7  r0  r   N)r  r   r   rP  
issubdtypecomplexfloatingrJ  r  )lengthsdtsmodesdt1dt2rM   r   r   r0   ra   r  r  r  r  r  s   &&&         r"   r"  7TestNPFunctions._test_correlate_convolve.<locals>.check  s    (1(9(9'E)$! IIa+IIa+==b&8&899R!V++C0A==b&8&899R!V++C0A!!T2At,''6)r$   r  validNzonly supported on 1D arraysr  r  )r  r  r  r  )r  r  same)r   r   r   r7  r:  rK  int32int64r
  r  rP  r  rC  r   rD  rB  rE  )r  r  r"  r  r  r  _a_br!   r#  rH  r  r  s   ff          @r"   _test_correlate_convolve(TestNPFunctions._test_correlate_convolve  s   T"6*	7" ?G::r}}-CW%E'&ww"((BJJ

||R]],)gE"YYr]""1a(YYr]Xx(DA"";//6a 0/CMM#s6#3#345	 )//s   9	E77Fc                0    V P                  \        4       R # r   )r  r   r  s   &r"   test_correlateTestNPFunctions.test_correlate:  s    %%i0r$   c                   V P                  4        \        P                  ! R
R7      p\        P                  ! ^4      p\	        RR7      ! V4      pW#3W233 F  w  rVV P                  \        4      ;_uu_ 4       pV! WV4       RRR4       \        V4      ^ 8X  d(   V P                  R\        XP                  4      4       Kj  V P                  R\        XP                  4      4       K  	  V P                  \        4      ;_uu_ 4       pV! W3RR7       V P                  R	\        VP                  4      4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r   )r  Tr@  Nz'a' cannot be emptyz'v' cannot be emptyzinvalid moder   zInvalid 'mode'r   )rF  r   r  rP  r   rC  r  r8  rD  rB  rE  )r  r  r  r  r  r!   r#  rH  s   &&      r"   #_test_correlate_convolve_exceptions3TestNPFunctions._test_correlate_convolve_exceptions=  s   ! WW4 YYq\T"2&Xx(DA"":..&a /1v{3S9I9I5JK3S9I9I5JK ) z**f"~.MM*C0@0@,AB +* /. +**s   8	E 0E EE$	c                0    V P                  \        4       R # r   )r  r   r  s   &r"   test_correlate_exceptions)TestNPFunctions.test_correlate_exceptionsR  s    00;r$   c                0    V P                  \        4       R # r   )r  r   r  s   &r"   test_convolveTestNPFunctions.test_convolveV  s    %%h/r$   c                0    V P                  \        4       R # r   )r  r   r  s   &r"   test_convolve_exceptions(TestNPFunctions.test_convolve_exceptionsY  s    00:r$   c                L    V! R/ VB pV! R/ VB pV P                  WVVR 7       R# )r  Nr  ri  )r  r  r  paramsr  r  r  s   &&&&&  r"   _check_outputTestNPFunctions._check_output\  s-    #F#ofow?r$   c                x  a \         p\        R R7      ! V4      p\        V P                  W4      oV3R lp\        '       dG   V! \
        P                  ! . R	O4      4       V! \
        P                  ! . 4      4       V! . R
O4       R# V! \
        P                  ! . RO4      4       V! \
        P                  ! ^4      R,
          4       V! \
        P                  ! ^^
^4      4       V! \
        P                  ! R\
        P                  \
        P                  \
        P                  ) .4      4       V! \
        P                  ! . 4      4       V! \
        P                  ! R^4      R,
          4       V! \
        P                  ! R .^,          R.^,          ,           4      4       \
        P                  \
        P                  \
        P                  \
        P                  3 F!  pV! \
        P                  ! ^
VR7      4       K#  	  V! . RO4       V! R4       V! R4       V! R4       V! R4       V! R4       R# )Tr@  c                   < \         '       d	   . ROpR.pM. ROpRR.pRV /pS! V4       V F  pRV RV/pS! V4       K  	  \         '       g<   V F  pRV RV/pS! V4       K  	  V F  pV F  pRV RVRV/pS! V4       K  	  K  	  R # R # )NFTr!   r   r  )Nr  r  )Nr   r  r  r  r  )r   )r!   	n_choicesincreasing_choicesr  rM   r  r  s   &     r"   _check1TestNPFunctions.test_vander_basic.<locals>._checkf  s    (	&+W"1	&*E]" 1XF&! q#q)f%  #?"4J!1lJ?F!&) #5
 #A&8
"%q#q,
!K%f- '9 # #r$   N      %@333333?333333?Fr7  r  r   r  r  )r  r  r  r+  r,  r   r  r  r  r  r+  r  r  )r'  r%  rq  r  )r  g-@A`"	@)TFr  )r  r   r   r  r   r   r9  rP  r  r  r"  r  r  r
  r7  )r  r  r  r  r8  r  s   &    @r"   test_vander_basic!TestNPFunctions.test_vander_basica  s~   T"6* 2 2FB	.: ?288I&'288B< 9rxx%&ryy|d"#r{{1b!$%rxxbffbffrvvg678rxx|ryyQ#%& 	rxx
eWq[012 XXrxxRZZ?E299Ru-. @ 	||r
 	 ! r$   c                <  a aa \         p\        R R7      ! V4      oS P                  4        \        P                  ! ^4      R,
          oVV V3R lpRR \        P
                  ^^.3 F  pV! V4       K  	  S P                  \        4      ;_uu_ 4       pS! SR	R7       RRR4       S P                  R\        XP                  4      4       VV 3R lp\        P                  ! ^4      P                  R
4      oV! S4       RoV! S4       R#   + '       g   i     Lu; i)Tr@  r)  c                    < SP                  4       ;_uu_ 4       pS! SV R 7       RRR4       SP                  R\        XP                  4      4       R#   + '       g   i     L7; i)r   Nz,Second argument N must be None or an integerr  rD  rB  rE  )r   rH  r  r  r!   s   & r"   _check_n8TestNPFunctions.test_vander_exceptions.<locals>._check_n  sH    ''))Va1 *MMHf../1 *)s   AA$	r3  r   Nz#Negative dimensions are not allowedc                    < SP                  \        4      ;_uu_ 4       pS! V 4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; i)Nz.x must be a one-dimensional array or sequence.)rC  r  r~  rB  rE  )r!   rH  r  r  s   & r"   	_check_1d9TestNPFunctions.test_vander_exceptions.<locals>._check_1d  sJ    "":..&a /M !1!124 /.   	AA'	r  )r  r  r  )r  r  ry  )r  r   rF  r   rP  r"  rC  r  rD  rB  rE  r  )r  r  r  r   rH  r  r  r!   s   f     @@r"   test_vander_exceptions&TestNPFunctions.test_vander_exceptions  s    T"6* 	!IIaL3	1 dBFFQF*AQK + z**f!rN +;&**+	-	4 IIbM!!),!! +*s   DD	c                    \         p\        R R7      ! V4      p\        V P                  W4      pR pV! 4        F  pRV/pV! V4       K  	  R# )Tr@  c                  0    \         P                  ! R^4      # r  r   rP  r  r$   r"   n_variations6TestNPFunctions.test_tri_n_basic.<locals>.n_variations      99R##r$   r   N)r   r   r   r  )r  r  r  r  r  rM   r  s   &      r"   test_tri_n_basic TestNPFunctions.test_tri_n_basic  sK    T"6*++V;	$ A1XF6N  r$   c                    \         p\        R R7      ! V4      p\        V P                  W4      pR pR pV! 4        F  pRV/pV! V4       K  	  V! 4        F  pV! 4        F  pRVRV/pV! V4       K  	  K!  	  R# )Tr@  c                  0    \         P                  ! R^4      # r  r  r  r$   r"   r  8TestNPFunctions.test_tri_n_m_basic.<locals>.n_variations  r   r$   c                  Z    \         P                  P                  R .\        R^	4      34      # Nr,  r  chainfrom_iterabler  r  r$   r"   m_variations8TestNPFunctions.test_tri_n_m_basic.<locals>.m_variations  $    ??004&%A,1GHHr$   r   r   N)r   r   r   r  )	r  r  r  r  r  r+  rM   r  r   s	   &        r"   test_tri_n_m_basic"TestNPFunctions.test_tri_n_m_basic  s    T"6*++V;	$	I
 A1XF6N  
 A!^q#q)v $  r$   c                    \         p\        R R7      ! V4      p\        V P                  W4      pR pR pV! 4        F  pRV/pV! V4       K  	  V! 4        F  pV! 4        F  pRVRV/pV! V4       K  	  K!  	  R# )Tr@  c                  0    \         P                  ! R^4      # r  r  r  r$   r"   r  8TestNPFunctions.test_tri_n_k_basic.<locals>.n_variations  r   r$   c                  0    \         P                  ! R^
4      # rN  r  r  r$   r"   k_variations8TestNPFunctions.test_tri_n_k_basic.<locals>.k_variations      99S"%%r$   r   r   N)r   r   r   r  )	r  r  r  r  r  r6  rM   r  r   s	   &        r"   test_tri_n_k_basic"TestNPFunctions.test_tri_n_k_basic  s    T"6*++V;	$	& A1XF6N  
 A!^q#q)v $  r$   c           	        \         p\        R R7      ! V4      p\        V P                  W4      pR pR pR pV! 4        F  pRV/pV! V4       K  	  V! 4        F  pV! 4        F  p	RVRV	/pV! V4       K  	  K!  	  V! 4        F  pV! 4        F  p
RVRV
/pV! V4       K  	  K!  	  V! 4        F/  pV! 4        F!  p
V! 4        F  p	RVRV	RV
/pV! V4       K  	  K#  	  K1  	  R# )	Tr@  c                  0    \         P                  ! R^4      # r  r  r  r$   r"   r  :TestNPFunctions.test_tri_n_m_k_basic.<locals>.n_variations  r   r$   c                  Z    \         P                  P                  R .\        R^	4      34      # r'  r(  r  r$   r"   r+  :TestNPFunctions.test_tri_n_m_k_basic.<locals>.m_variations  r-  r$   c                  0    \         P                  ! R^
4      # r4  r  r  r$   r"   r6  :TestNPFunctions.test_tri_n_m_k_basic.<locals>.k_variations  r8  r$   r   r   r   N)r   r   r   r  )r  r  r  r  r  r+  r6  rM   r  r   r   s   &          r"   test_tri_n_m_k_basic$TestNPFunctions.test_tri_n_m_k_basic  s    T"6*++V;	$	I	& A1XF6N  
 A!^q#q)v $   A!^q#q)v $   A!^%A!1c1c15F6N ( $  r$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpRR \        P                  ^^.3 F  pV! V4       K  	  R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! ^^V R7       RRR4       R\        XP                  4      9   g   Q hR#   + '       g   i     L.; i)r+  r   Nk must be an integer)r  rB  rE  )r   rH  r  r  s   & r"   r  3TestNPFunctions.test_tri_exceptions.<locals>._check-  sG    ''))Vaa  *)S1A1A-BBBB *)s   AA	r  N)r   r   rF  r   r"  )r  r  r  r   r  s   f   @r"   test_tri_exceptions#TestNPFunctions.test_tri_exceptions&  sO    T"6* 	!	C
 dBFFQF*A1I +r$   c                b   a aa \        R R7      ! S4      oVVV 3R lpS P                  S SV4      # )Tr@  c                    < S! V 4      pS! V 4      pSP                  VP                  VP                  4       \        P                  P	                  W!4       R # r   )r~  r8  r   testingassert_array_equal)r@   r  r  r  r  r  s   &  r"   r  :TestNPFunctions._triangular_matrix_tests_m.<locals>._check8  s?    c{H*CSYY7JJ))#8r$   r   _triangular_matrix_tests_innerr  r  r  r  s   ff @r"   _triangular_matrix_tests_m*TestNPFunctions._triangular_matrix_tests_m5  s.    T"6*	9 224HHr$   c                b   a aa \        R R7      ! S4      oVVV 3R lpS P                  S SV4      # )Tr@  c                 2  < \         P                  P                  R .\        R^
4      34       Fe  pVf   / pMRV/pS! V 3/ VB pS! V 3/ VB pSP	                  VP
                  VP
                  4       \        P                  P                  WC4       Kg  	  R # )Nr   r5  )	r  r)  r*  r  r~  r8  r   rM  rN  )r@   r   r  r  r  r  r  r  s   &    r"   r  <TestNPFunctions._triangular_matrix_tests_m_k.<locals>._checkD  s    __22TFE#rN3KL9F!1XF!#00C*6*  HNN;

--c< Mr$   rP  rR  s   ff @r"   _triangular_matrix_tests_m_k,TestNPFunctions._triangular_matrix_tests_m_kA  s.    T"6*
	= 224HHr$   c                  a V3R  lpV3R lpV! \         P                  ! ^?4      R,           4       V! \         P                  ! ^@4      R,
          4       S! \         P                  ! R4      P                  ^^^^4      4       S! \         P                  ! . 4      4       S! \         P                  ! ^	4      P                  R4      RRR1,          4       S! \         P                  ! ^	4      P                  RRR7      4       \         P                  ! ^@4      R,
          P                  R	4      pS! V4       S! \         P                  ! V4      4       R# )
c                    < S! V 4       V P                  R4      p S! V 4       V P                  R4      p S! V 4       S! V P                  4       R# )r  N)r  r  )r  r  r  r  r  Tr0   r  s   &r"   	check_oddATestNPFunctions._triangular_matrix_tests_inner.<locals>.check_oddU  s?    1I		&!A1I		,'A1I133Kr$   c                    < S! V 4       V P                  R4      p S! V 4       V P                  R4      p S! V 4       S! V P                  4       R# )r  N)r     r  r  r  r  r\  r^  s   &r"   
check_evenBTestNPFunctions._triangular_matrix_tests_inner.<locals>.check_even]  s?    1I		'"A1I		,'A1I133Kr$   r  ih  NForder)r  r  r  rc  )r   rP  r  r9  asfortranarray)r  r  r  r_  rd  r@   s   &&f   r"   rQ  .TestNPFunctions._triangular_matrix_tests_innerR  s    		 	"))B-$&'299R=4'( 	ryy~%%aAq12rxx|ryy|##F+DbD12ryy|##F##67yy}t#,,\:sr  %&r$   c                >   \        R R7      ! V4      pV P                  4        \        P                  ! R4      pV P	                  4       ;_uu_ 4       pV! VRR7       V P                  R\        VP                  4      4       RRR4       R#   + '       g   i     R# ; i)Tr@  r  rF  rG  Nr+  r  )r   rF  r   r  r  rD  rB  rE  )r  r  r  r0   rH  s   &&   r"   _triangular_matrix_exceptions-TestNPFunctions._triangular_matrix_exceptionsr  so    T"6* 	!GGFO##%%!sOMM0#f6F6F2GH &%%%s   0BB	c                J   \        R R7      ! V4      pV F  pV! V!  pV! V!  pV P                  \        V4      \        V4      4       V P                  \        V4      \        V4      4       \	        WV4       F$  w  rx\
        P                  P                  Wx4       K&  	  K  	  R# r  )r   r~  typer8  r  r   rM  rN  )	r  r  rn   r  r!   r  r  egs	   &&&      r"   _triangular_indices_tests_base.TestNPFunctions._triangular_indices_tests_base}  s    T"6*AqzH)CT(^T#Y7S]CH5H*

--a3 + r$   c                f    T P                  T\        ^
4       Uu. uF  q".NK  	  up4       R# u upi rN  Nrs  r  )r  r  rM   s   && r"   _triangular_indices_tests_n+TestNPFunctions._triangular_indices_tests_n  s,    ++)$)QS)$	
$s   .
c                    T P                  T\        ^
4       UUu. uF(  p\        V) ^,
          V^,           4       F  q2V.NK  	  K*  	  upp4       R# u uppi rv  rw  )r  r  rM   r   s   &&  r"   _triangular_indices_tests_n_k-TestNPFunctions._triangular_indices_tests_n_k  sH    ++"2YEYqb1fa!e0D1V0DVYE	
Es   .Ac                    T P                  T\        ^
4       UUu. uF  p\        ^V,          4       F  q2V.NK  	  K!  	  upp4       R# u uppi rv  rw  )r  r  rM   r   s   &&  r"   _triangular_indices_tests_n_m-TestNPFunctions._triangular_indices_tests_n_m  s>    ++"2Y=Ya!e1VVY=	
=s   %A
c                    T P                  T\        ^
4       UUUu. uFB  p\        V) ^,
          V^,           4       F   p\        ^V,          4       F  pW#V.NK	  	  K"  	  KD  	  uppp4       \        RR7      ! V4      pV! ^4       R# u upppi )rN  Tr@  N)rs  r  r   )r  r  rM   r   r   r  s   &&    r"   _triangular_indices_tests_n_k_m/TestNPFunctions._triangular_indices_tests_n_k_m  s    ++ %b	 $	1QBFAE*AEl AY" * 	 $	
 T"6*a$s   AB	c                   \        R R7      ! V4      p\        \        \        3 F  p\        P
                  ! \        ^
4      \        ^
4      4       F  w  rE\        P                  ! WE3V4      pV! V4      pV! V4      pV P                  \        V4      \        V4      4       V P                  \        V4      \        V4      4       \        Wx4       F$  w  r\        P                  P                  W4       K&  	  K  	  K  	  R# r  r   r  rz  boolr  r   r  r   r  r~  rp  r8  r  rM  rN  )r  r  r  r8  rM   r   r@   r  r  rq  rr  s   &&         r"   "_triangular_indices_from_tests_arr2TestNPFunctions._triangular_indices_from_tests_arr  s    T"6*5$'E ((rE"I>ggqfe,!#;Cj  hc;  XC9.DAJJ11!7 / ? (r$   c           	     *   \        R R7      ! V4      p\        \        \        3 F  p\        P
                  ! \        ^
4      \        ^
4      4       F  w  rE\        P                  ! WE3V4      p\        R^
4       F  pV! V4      pV! V4      p	V P                  \        V4      \        V	4      4       V P                  \        V4      \        V	4      4       \        W4       F$  w  r\        P                  P                  W4       K&  	  K  	  K  	  K  	  R# )Tr@  Nr5  r  )r  r  r  r8  rM   r   r@   r   r  r  rq  rr  s   &&          r"   $_triangular_indices_from_tests_arr_k4TestNPFunctions._triangular_indices_from_tests_arr_k  s    T"6*5$'E ((rE"I>ggqfe,sBA%c{H*C$$T(^T#Y?$$S]CH= #H 2

55a; !3 ( ? (r$   c                   \        R R7      ! V4      p\        V4      P                  pV P                  4       ;_uu_ 4       pV! R4       RRR4       V P	                  R\        XP                  4      4       RV9   dQ   V P                  4       ;_uu_ 4       pV! ^RR7       RRR4       V P	                  R\        VP                  4      4       RV9   dS   V P                  4       ;_uu_ 4       pV! ^RR	7       RRR4       V P	                  R
\        VP                  4      4       R# R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L_; i)Tr@  r%  Nzn must be an integerr   rF  rG  r   r   zm must be an integer)r   r   
parametersr  rD  rB  rE  )r  r  r  r  rH  s   &&   r"   _triangular_indices_exceptions.TestNPFunctions._triangular_indices_exceptions  s    T"6* (33
##%%#J &,c&2B2B.CD*''))Va3 *MM0#f6F6F2GH*''))Va3 *MM0#f6F6F2GH  &%
 *)
 *)s$    	D(D;,E(D8	;E	E	c                D   \        R R7      ! V4      pR Fo  p\        P                  ! ^.V,          4      pV P                  4       ;_uu_ 4       pV! V4       RRR4       V P	                  R\        XP                  4      4       Kq  	  V'       dk   \        P                  ! ^^.4      pV P                  4       ;_uu_ 4       pV! VRR7       RRR4       V P	                  R\        XP                  4      4       R# R#   + '       g   i     L; i  + '       g   i     LL; i)Tr@  Nzinput array must be 2-dr)  rF  rG  r   r  r  )r   r   r  r  rD  rB  rE  )r  r  test_kr  ndimsr0   rH  s   &&&    r"   #_triangular_indices_from_exceptions3TestNPFunctions._triangular_indices_from_exceptions  s    T"6*Ee$A''))Va *MM3S9I9I5JK	  AA''))Va3 *MM0#f6F6F2GH	 	 *) *)s   	C< D<DD	c                Z    V P                  \        4       V P                  \        4       R # r   )rS  r   rX  r   r  s   &r"   test_tril_basicTestNPFunctions.test_tril_basic      ''/))(3r$   c                0    V P                  \        4       R # r   )rm  r   r  s   &r"   test_tril_exceptions$TestNPFunctions.test_tril_exceptions      **84r$   c                V   V P                  \        4       V P                  \        4       V P	                  \
        4       V P                  \        4       V P                  \        4       V P                  \        4       V P                  \
        4       V P                  \        4       R # r   )	rx  r   r{  r   r~  r   r  r   r  r  s   &r"   test_tril_indices!TestNPFunctions.test_tril_indices  x    ((8**+;<**+;<,,-?@++N;++,<=++,<=++,>?r$   c                    V P                  \        4       V P                  \        4       V P	                  \        R 4       V P	                  \        R4       R# FTN)r  r   r  r   r  r  s   &r"   test_tril_indices_from&TestNPFunctions.test_tril_indices_from  B    //0EF112IJ001FN001H$Or$   c                Z    V P                  \        4       V P                  \        4       R # r   )rS  r  rX  r  r  s   &r"   test_triu_basicTestNPFunctions.test_triu_basic  r  r$   c                0    V P                  \        4       R # r   )rm  r  r  s   &r"   test_triu_exceptions$TestNPFunctions.test_triu_exceptions  r  r$   c                V   V P                  \        4       V P                  \        4       V P	                  \
        4       V P                  \        4       V P                  \        4       V P                  \        4       V P                  \
        4       V P                  \        4       R # r   )	rx  r  r{  r  r~  r  r  r  r  r  s   &r"   test_triu_indices!TestNPFunctions.test_triu_indices 	  r  r$   c                    V P                  \        4       V P                  \        4       V P	                  \        R 4       V P	                  \        R4       R# r  )r  r  r  r  r  r  s   &r"   test_triu_indices_from&TestNPFunctions.test_triu_indices_from
	  r  r$   c                    \         p\        \         4      pR  pV! 4        F!  pV P                  V! V4      V! V4      4       K#  	  R# )c               3   .   "   Rx  Rx  Rx  Rx  R# 5i)r  N)r  r  )r  r  )r  r  r  r+  r  r  r$   r"   inputs2TestNPFunctions.test_indices_basic.<locals>.inputs	  s     LJJs   N)r  r   r  )r  r  r  r  dimss   &    r"   test_indices_basic"TestNPFunctions.test_indices_basic	  s<    Z 	 HD##F4L%+> r$   c                   \        \        4      pV P                  4        R pV P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  V\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  V\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)z5The argument "dimensions" must be a tuple of integersabcN)rq  r  )r  r  )r   r  rF  rC  r   rD  rB  rE  )r  r  errmsgrH  s   &   r"   test_indices_exception&TestNPFunctions.test_indices_exception	  s    Z !H{++v%L ,f&**+	- {++v* ,f&**+	- {++v(O ,f&**+	- ,+
 ,+
 ,+s#   	D	D0%	ED-	0E 	E	c                "   V! W44      pV! W44      pV P                  \        P                  ! VR V 4      \        P                  ! VR V 4      4       V P                  \        P                  ! WTR  4      \        P                  ! WdR  4      4       R # r   r  r   r  r  r  r  r0   r  r  r  s   &&&&&  r"   partition_sanity_check&TestNPFunctions.partition_sanity_check3	  sr     !>Am 			(4C. 9299S#Y;OP 			(4. 9299SY;OPr$   c           	     V   V! W44      pV! W44      pV P                  \        P                  ! W5R V ,          4      \        P                  ! W6R V ,          4      4       V P                  \        P                  ! W5VR  ,          4      \        P                  ! W6VR  ,          4      4       R # r   r  r  s   &&&&&  r"   argpartition_sanity_check)TestNPFunctions.argpartition_sanity_check@	  s     !>Am 			!TcN*; < "		!I, 7	9 			!STN*; < "		!I, 7	9r$   c           
        \         p\        R R7      ! V4      p\        '       d   RMRp\        V!  pV EF  p\        '       d   ^\	        ^V^,
          4      3M
^V^,
          3p\        V!  pV EFT  p\
        P                  ! V4      p	V P                  P                  V	4       WP                  P                  ^^4      ,          p	V P                  P                  V	P                  4      p
^ WV^,           V
) V) .p\
        P                  ! V	4      V,          pV P                  V! W4      V,          V4       \        '       gf   V P                  V! V	P                  4       V4      V,          V4       V P                  V! \        V	P                  4       4      V4      V,          V4       V F  pV P                  WW4       K  	  EKW  	  EK  	  R# Tr@  N)rN     )rN  r  )r  r   r   r  r  r   rP  r  r  rT  rO  r  r  tolisttupler  r  r  r  j_range_argsj_rangeji_range_argsi_ranger  didxr  tgtr   s   &             r"   test_partition_fuzz#TestNPFunctions.test_partition_fuzzO	  s}    T"6*$3O&A. Aq1u."#QU  \*GIIaL  #((B//hh&&qvv.#!a%#r2ggajo''ac(:(+- '++E!((*c,B3,G,/1++E%
2CS,I#,N,/1 A//qD !  r$   c                   \         p\        R R7      ! V4      p\        '       d   RMRp\        V!  pV EF  p\        '       d   ^\	        ^V^,
          4      3M
^V^,
          3p\        V!  pV EFx  p\
        P                  ! V4      p	V P                  P                  V	4       WP                  P                  ^^4      ,          p	V P                  P                  V	P                  4      p
^ WV^,           V
) V) .p\
        P                  ! V	4      V,          pV P                  W! W4      V,          ,          W,          4       \        '       g~   V P                  W! V	P                  4       V4      V,          ,          W,          4       V P                  W! \        V	P                  4       4      V4      V,          ,          W,          4       V F  pV P                  WW4       K  	  EK{  	  EK  	  R# r  )r   r   r   r  r  r   rP  r  r  rT  rO  argsortr  r  r  r  r  s   &             r"   test_argpartition_fuzz&TestNPFunctions.test_argpartition_fuzzo	  s    T"6*$3O&A. Aq1u."#QU  \*GIIaL  #((B//hh&&qvv.#!a%#r2jjmC(''%-*<(=()0 '++AeAHHJ.DS.I,J,-F4++%ahhj 137<=  A226!G #  r$   c                   a a \         p\        R R7      ! V4      oS P                  4        \        P                  ! ^
4      pVV 3R lpV! V^
4       V! VR4       V! VR4       R# )Tr@  c                    < SP                  \        4      ;_uu_ 4       pS! W4       R R R 4       \        XP                  4      R8X  g   Q hR #   + '       g   i     L.; iNzkth out of boundsrC  r  rB  rE  r0   r  rq  r  r  s   && r"   r  ETestNPFunctions.test_partition_exception_out_of_range.<locals>._check	  C    "":..!a /q{{#':::: /.   	AA	Nr  r  )r  r   rF  r   rP  r  r  r0   r  r  s   f   @r"   %test_partition_exception_out_of_range5TestNPFunctions.test_partition_exception_out_of_range	  sY     T"6* 	! IIbM	;
 	q"q#q'r$   c                   a a \         p\        R R7      ! V4      oS P                  4        \        P                  ! ^
4      pVV 3R lpV! V^
4       V! VR4       V! VR4       R# )Tr@  c                    < SP                  \        4      ;_uu_ 4       pS! W4       R R R 4       \        XP                  4      R8X  g   Q hR #   + '       g   i     L.; ir  r  r  s   && r"   r  HTestNPFunctions.test_argpartition_exception_out_of_range.<locals>._check	  r  r  Nr  r  )r   r   rF  r   rP  r  s   f   @r"   (test_argpartition_exception_out_of_range8TestNPFunctions.test_argpartition_exception_out_of_range	  sY     T"6* 	! IIbM	;
 	q"q#q'r$   c                  a a \         p\        R R7      ! V4      oS P                  4        VV 3R lp\        P                  ! ^
4      pV! VR4       V! VR4       V! V\        P
                  ! ^^\        P                  34      4       R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; iNzPartition index must be integerr  r0   r  rH  r  r  s   && r"   r  HTestNPFunctions.test_partition_exception_non_integer_kth.<locals>._check	  F    ''))Va *MM;f../1 *)   	AA"	      "@Nffffff
@r  )r  r   rF  r   rP  r9  r  r  r  r  r0   r  s   f   @r"   (test_partition_exception_non_integer_kth8TestNPFunctions.test_partition_exception_non_integer_kth	  sk     T"6* 	!	1 IIbMq#q*q"((Aq"&&>*+r$   c                  a a \         p\        R R7      ! V4      oS P                  4        VV 3R lp\        P                  ! ^
4      pV! VR4       V! VR4       V! V\        P
                  ! ^^\        P                  34      4       R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; ir  r  r  s   && r"   r  KTestNPFunctions.test_argpartition_exception_non_integer_kth.<locals>._check	  r  r  r  Nr  )r   r   rF  r   rP  r9  r  r  s   f   @r"   +test_argpartition_exception_non_integer_kth;TestNPFunctions.test_argpartition_exception_non_integer_kth	  sk     T"6* 	!	1 IIbMq#q*q"((Aq"&&>*+r$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpV! ^^ 4       V! R^ 4       R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; iNz(The first argument must be an array-liker  r  s   && r"   r  ITestNPFunctions.test_partition_exception_a_not_array_like.<locals>._check	  F    ''))Va *MMDf../1 *)r  SausagesN)r  r   rF  rR  s   f  @r"   )test_partition_exception_a_not_array_like9TestNPFunctions.test_partition_exception_a_not_array_like	  s?    T"6* 	!	1 	q!z1r$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpV! ^^ 4       V! R^ 4       R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; ir   r  r  s   && r"   r  LTestNPFunctions.test_argpartition_exception_a_not_array_like.<locals>._check	  r  r  r  N)r   r   rF  rR  s   f  @r"   ,test_argpartition_exception_a_not_array_like<TestNPFunctions.test_argpartition_exception_a_not_array_like	  s?    T"6* 	!	1 	q!z1r$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpV! \        P                  ! ^4      ^ 4       R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; iNz3The first argument must be at least 1-D (found 0-D)r  r  s   && r"   r  CTestNPFunctions.test_partition_exception_a_zero_dim.<locals>._check	
  F    ''))Va *MMOf../1 *)r  N)r  r   rF  r   r9  rR  s   f  @r"   #test_partition_exception_a_zero_dim3TestNPFunctions.test_partition_exception_a_zero_dim
  s>    T"6* 	!	1 	rxx{Ar$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpV! \        P                  ! ^4      ^ 4       R# )Tr@  c                    < SP                  4       ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; ir  r  r  s   && r"   r  FTestNPFunctions.test_argpartition_exception_a_zero_dim.<locals>._check
  r  r  N)r   r   rF  r   r9  rR  s   f  @r"   &test_argpartition_exception_a_zero_dim6TestNPFunctions.test_argpartition_exception_a_zero_dim
  s>    T"6* 	!	1 	rxx{Ar$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpV! \        P                  ! ^
4      \        P                  ! ^4      P                  ^^4      R7       R# )Tr@  c                    < SP                  \        4      ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; iNzkth must be scalar or 1-Dr  r  s   && r"   r  NTestNPFunctions.test_partition_exception_kth_multi_dimensional.<locals>._check'
  E    "":..&a /MM5s6;K;K7LM /.r  r  N)r  r   rF  r   rP  r  rR  s   f  @r"   .test_partition_exception_kth_multi_dimensional>TestNPFunctions.test_partition_exception_kth_multi_dimensional 
  sT    T"6* 	!	N
 	ryy}"))A,"6"6q!"<=r$   c                   a a \         p\        R R7      ! V4      oS P                  4        VV 3R lpV! \        P                  ! ^
4      \        P                  ! ^4      P                  ^^4      R7       R# )Tr@  c                    < SP                  \        4      ;_uu_ 4       pS! W4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; ir  r  r  s   && r"   r  QTestNPFunctions.test_argpartition_exception_kth_multi_dimensional.<locals>._check5
  r  r  r  N)r   r   rF  r   rP  r  rR  s   f  @r"   1test_argpartition_exception_kth_multi_dimensionalATestNPFunctions.test_argpartition_exception_kth_multi_dimensional.
  sT    T"6* 	!	N
 	ryy}"))A,"6"6q!"<=r$   c                   a aa \         o\        R R7      ! S4      oRVVV 3R llp\        P                  ! . 4      pVP	                  R4      pVR\        P                  ! . 4      3 F  pV! V4       K  	  R# )Tr@  c                 J   < S! W4      pS! W4      pSP                  W#4       R # r   ri  r0   r  r  r  r  r  r  s   &&  r"   r"  9TestNPFunctions.test_partition_empty_array.<locals>.checkB
  #    a~H-C##H2r$   Nr  r  r  r  r   r  )r  r   r   r9  r  r  r"  r0   r@   r  r  s   f   @@r"   test_partition_empty_array*TestNPFunctions.test_partition_empty_array<
  sb     T"6*	3 	3 HHRLIIl# b"((2,&C#J 'r$   c                   a aa \         o\        R R7      ! S4      oRVVV 3R llp\        P                  ! . 4      pVP	                  R4      pVR\        P                  ! . 4      3 F  pV! V4       K  	  R# )Tr@  c                 J   < S! W4      pS! W4      pSP                  W#4       R # r   ri  r&  s   &&  r"   r"  <TestNPFunctions.test_argpartition_empty_array.<locals>.checkU
  r(  r$   Nr  r)  r  )r   r   r   r9  r  r*  s   f   @@r"   test_argpartition_empty_array-TestNPFunctions.test_argpartition_empty_arrayO
  sb     T"6*	3 	3 HHRLIIl# b"((2,&C#J 'r$   c           	     P   \         p\        R R7      ! V4      p\        P                  ! . 4      pV! V^ 4      pV P	                  W44       \        P
                  ! ^4      pV! V^ 4      pV P	                  W44       \        P                  ! . RO4      pVP                  4       pV! \        P                  ! ^(4      V4       V P	                  WV4       ^^.^^.^^.3 Fo  p\        P                  ! V4      p\        P                  ! V4      pR F:  p	V P	                  V! W94      V	,          W,          4       V P                  WW94       K<  	  Kq  	  . RO. RO. R	O. R
O. RO. RO. RO. RO3 Fo  p\        P                  ! V4      p\        P                  ! V4      pR F:  p	V P	                  V! W94      V	,          W,          4       V P                  WW94       K<  	  Kq  	  \        P
                  ! ^24      pV P	                  V! V^ 4      V4       \        P                  ! ^14      pR F4  p	V P                  V! W94      V	,          V	4       V P                  WW94       K6  	  \        P                  ! ^/4      RRR1,          pW3P                  4       \        VP                  4       4      3 F  p
V P                  V! V
^4      ^,          ^4       V P                  V! V
^4      ^,          ^4       V P	                  V! V
R4      V! V
^)4      4       V P	                  V! V
R4      V! V
^4      4       V P                  WVR4       K  	  \        '       d   ^dpMRp\        P                  ! V4      p\        P                  ! W3P                  ^,          4      pVP                  ^,          ^,           pV P                  V! W4      V,          V4       \        P                  ! V^,           4      p\        P                  ! W3P                  ^,          ^,           4      pVP                  ^,          ^,           pV P                  V! W4      V,          V4       \        P
                  ! ^
4      p^V^&   V P                  V! VR4      R,          ^4       V P                  V! VR4      ^,          ^4       \        P                   V^&   \        P"                  ! V! VR4      R,          4      '       g   Q h\        '       d   \        P                  ! ^4      ^,          p\        P                  ! \        P                  ! ^4      ^,          4      pV P$                  P'                  V4       \)        ^ VP                  ^4       F:  pV P                  V! W>4      V,          W,          4       V P                  WW>4       K<  	  M\        P                  ! ^/4      ^,          p\        P                  ! \        P                  ! ^/4      ^,          4      pV P$                  P'                  V4       \)        VP                  4       F:  pV P                  V! W>4      V,          W,          4       V P                  WW>4       K<  	  \        P                  ! . RO4      p. ROpV P                  \        V! W54      V,          4      R4       \        P*                  \        P,                  3 UUu. uF  pR F  pVV3NK	  	  K  	  pppV EF1  w  pp\        P                  ! VVR7      pV P$                  P'                  V4       \        P.                  ! \        P                  ! VVR7      R4      p\1        V P$                  P&                  V4       \)        VP                  4       F  pV! W>4      pV P                  VV,          V4       \        P2                  P5                  VRV VV,          4       \        P2                  P5                  VV,          VV^,           R 4       V P                  WW>4       K  	  EK4  	  R# u uppi )Tr@  N@B r7  r  r  r+  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r+  r  r  r  r  r  r   r  r  r  r  r+  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r     rI  r   r  r  r  r  rb  r  r  )r  r   r   r9  r  r  r  rP  r  r  r~  r  r  r   r/  rO  r  isnanr  r  r  r  r
  tilemaprM  assert_array_less)r  r  r  r  r  r  okthrw  r  r   r0   SIZEr!   midr  dtstdd1r  s   &                   r"   test_partition_basic$TestNPFunctions.test_partition_basicb
  s    T"6*HHRLAqk'GGAJAqk' hh{#xxzbiimS!*a&1a&1a&)AA''!*C''aA?++F1@  * Y	9Y	9>AA''!*C''aA?++F1@ 	> GGBKaQ/ IIbMAU1[^Q/''q< 
 IIbM$B$HHJahhj 11AU1a[^Q/U1b\"-r2##E!RL%2,?##E!SM5B<@''q#> 2 ?DDIIdOGGAvv{#ffkAoqs+S1IIdQhGGAvv{Q'ffkAoqs+S1 GGBK!q'*2.2q'*1-q1vv!xxa)"-.... ?		"!A''"))B-!+,CHHQ1affa(  qQ8++F1@ ) 		"!A''"))B-!+,CHHQ166]  qQ8++F1@ # HH ( )uQ}S12LA!#2:: 6H 6"1r1gg 6HEB		!2&AHHQ1B/8B  "%166]!K  1q)

,,QrUAaD9

,,QqT1QUV9=++F1@ #  Is   `"c           	        \         p\        R R7      ! V4      p\        P                  ! . \        P                  R7      pV! V^ 4      pV! V^ 4      pV P                  WE4       \        P                  ! ^\        P                  R7      pV! V^ 4      pV! V^ 4      pV P                  WE4       \        P                  ! . RO4      pVP                  4       pV! \        P                  ! ^(4      V4       V P                  Wg4       ^^.^^.^^.3 F|  p\        P                  ! V4      p\        P                  ! V4      p	R FG  p
V P                  W2! W:4      V
,          ,          W9V
,          ,          4       V P                  WW:4       KI  	  K~  	  . RO. R	O. R
O. RO. RO. RO. RO. RO3 F|  p\        P                  ! V4      p\        P                  ! V4      p	R FG  p
V P                  W2! W:4      V
,          ,          W9V
,          ,          4       V P                  WW:4       KI  	  K~  	  \        P                  ! ^24      pV P                  W2! V^ 4      ,          V4       \        P                  ! ^14      pR F4  p
V P                  V! W:4      V
,          V
4       V P                  WW:4       K6  	  \        P                  ! ^/4      RRR1,          pW3P                  4       \        VP                  4       4      3 F  pV P                  V! V^4      ^,          ^(4       V P                  V! V^4      ^,          ^4       V P                  V! VR4      V! V^)4      4       V P                  V! VR4      V! V^4      4       V P                  WVR4       K  	  \        '       d   RpMRp\        P                  ! V4      p\        P                   ! W3P"                  ^,          4      pVP"                  ^,          ^,           pV P                  W! W4      V,          ,          V4       \        P                  ! V^,           4      p\        P                   ! W3P"                  ^,          ^,           4      pVP"                  ^,          ^,           pV P                  W! W4      V,          ,          V4       \        P                  ! ^
4      p^V^&   V P                  W2! VR4      R,          ,          ^4       V P                  W2! VR4      ^,          ,          ^4       \        P$                  V^&   \        P&                  ! W2! VR4      R,          ,          4      '       g   Q h\        P                  ! ^/4      ^,          p\        P(                  ! \        P                  ! ^/4      ^,          4      p	V P*                  P-                  V4       \/        VP"                  4       F@  pV P                  W2! W?4      V,          ,          W,          4       V P                  WW?4       KB  	  \        P                  ! . RO4      p. ROpV P                  \        W2! W64      V,          ,          4      R4       \        P0                  \        P2                  3 UUu. uF  pR F  pVV3NK	  	  K  	  pppV EF7  w  pp\        P                  ! VVR7      pV P*                  P-                  V4       \        P4                  ! \        P                  ! VVR7      R4      p\7        V P*                  P,                  V4       \/        VP"                  4       F  pW2! W?4      ,          pV P                  VV,          V4       \        P8                  P;                  VRV VV,          4       \        P8                  P;                  VV,          VV^,           R 4       V P                  WW?4       K  	  EK:  	  R# u uppi )Tr@  r7  Nr*  r3  r4  r5  r6  r  r7  r8  r9  r  r:  r;  r  r<  r  r  r=  r>  r?  r@  rB  rC  rD  )r   r   r   r9  r  r  r  r  rP  r  r  r~  r  r  r  r   r/  rO  r  rE  r  r  r  r  r  r
  rF  rG  rM  rH  )r  r  r  r  r  r  r  rI  rw  r  r   r0   rJ  r!   rK  r  rL  rM  rN  rO  r  s   &                    r"   test_argpartition_basic'TestNPFunctions.test_argpartition_basic
  s    T"6*HHRrxx(!Q<Aqk.GGARXX&!Q<Aqk. hh{#xxzbiimS!*a&1a&1a&)AA**Q-C''%+a.(91V9E..vaC  * Y	9Y	9>AA**Q-C''%+a.(91V9E..vaC 	> GGBK%1+2 IIbMAU1[^Q/''q< 
 IIbM$B$HHJahhj 11AU1a[^R0U1b\"-r2##E!RL%2,?##E!SM5B<@**6!SA 2 ?DDIIdOGGAvv{#ffkAo5=-.4IIdQhGGAvv{Q'ffkAo5=-.4 GGBK!5G,R01155G,Q/0!4vv!xx%7+B/01111 IIbMAggbiima'(qvvAQuQ{1~.7**6!?  HH ( )qqs!345|D!#2:: 6H 6"1r1gg 6HEB		!2&AHHQ1B/8B  "%166]eAkN  1q)

,,QrUAaD9

,,QqT1QUV9=..vaC #  Is    _c           	     X   ^ p\         P                  ! V4       F  p\         P                  P                  W5V W6,          RV,          R7       V P	                  W6R W6,          8  P                  4       RWcVR W6,          3,          R7       V^,           pV P                  WW64       K  	  R# r   zkth %d)err_msgNzkth %d, %r not greater equal %dr  )r   r  rM  rH  r:  allr  r  r  r  r  r  prevr   s   &&&&&  r"   assert_partitioned"TestNPFunctions.assert_partitionedB  s    AJJ((AD19A ) ?OOQrUad]//1"&)*abE14(8"9  ; q5D''q< r$   c           	     X   ^ p\         P                  ! V4       F  p\         P                  P                  W5V W6,          RV,          R7       V P	                  W6R W6,          8  P                  4       RWcVR W6,          3,          R7       V^,           pV P                  WW64       K  	  R# rV  )r   r  rM  rH  r:  rY  r  rZ  s   &&&&&  r"   assert_argpartitioned%TestNPFunctions.assert_argpartitionedM  s    AJJ((AD19A ) ?OOQrUad]//1"&)*abE14(8"9  ; q5D**6!? r$   c                H   \         p\        R R7      ! V4      p\        V P                  W4      p\        P
                  ! . RO4      pV! VR4      pV! VR4       V! V\        P                  ! VR4      ,          R4       V P                  WR! VR4      4       \        P                  ! ^4      pV P                  P                  V4       V P                  \        P                  ! ^4      V! V\        \        VP                  4      4      4      4       \        P                  ! ^4      pV P                  P                  V4       \        P
                  ! . RO4      pV P                  P                  V4       V! WF4      pV! WV4       V P                  P                  V4       V P                  V! WF4      V4       \        P                  ! ^4      RRR1,          pV! V! V^.^,          4      ^.4       V! V! V^.^,          ^^.,           4      ^.^,          ^^.,           4       R# Tr@  N)r  r  r  r  )r   r  r  )r  r  )r  r  r  r  )r  r   r   r\  r   r9  r   r  rP  r  r  r  r  rO  )r  r  r  r\  r  r  keyss   &      r"   test_partition_iterative(TestNPFunctions.test_partition_iterativeX  s    T"6*$T%<%<fLHH\"!V1f%1R__Q78&A5H#56IIbM		"uQU166]8K/LM IIbMxx&!N1#a2 IIbM$B$5QC!G,qc25QC!Gq"g$56a1b'8IJr$   c                   \         p\        R R7      ! V4      p\        V P                  VV4      p\        P
                  ! . RO4      pWB! VR4      ,          pV! VR4       V! V\        P                   ! VR4      ,          R4       V P                  WTV! VR4      ,          4       \        P                  ! ^4      pV P                  P                  V4       V P                  \        P                  ! ^4      WB! V\        \        VP                  4      4      4      ,          4       \        P                  ! ^4      pV P                  P                  V4       \        P
                  ! . RO4      pV P                  P                  V4       WB! WF4      ,          pV! WV4       V P                  P                  V4       V P                  WB! WF4      ,          V4       \        P                  ! ^4      RRR1,          pV! WB! V^.^,          4      ,          ^.4       V! WB! V^.^,          ^^.,           4      ,          ^.^,          ^^.,           4       R# rb  )r   r   r   r_  r   r9  r  rP  r  r  r  r  rO  )r  r  r  r_  r  r  rc  s   &      r"   test_argpartition_iterative+TestNPFunctions.test_argpartition_iterativez  s    T"6* '(B(B(.(-!/ HH\"eAva(a6 :;VDU1h%7#89IIbM		"qq$uQVV}:M1N/OP IIbMxx&eAna&%. 115 IIbM$B$aa!q 12QC8aa!qAr7): ;<qcAgB>OPr$   c                l  a aa \         o\        R R7      ! S4      oVVV 3R lpR p\        P                  ! ^^
^04      p\        P                  VR&   \        P
                  ) V^&   \        P
                  V^	&   VP                  R4      pV! V4       F  p\        R^4       F  pV! WE4       K  	  K   	  R# )Tr@  c           	        < S! W4      pS! W4      pSP                  VR R V3,          VR R V3,          4       \        P                  ! VP                  RR 4       F  pSP                  \        P                  ! W$,          RV 4      \        P                  ! W4,          RV 4      4       SP                  \        P                  ! W$,          VR 4      \        P                  ! W4,          VR 4      4       K  	  R# )NNNNr  )r  r   ndindexr  r  )r0   r  r  r  rM  r  r  r  s   &&   r"   r"  7TestNPFunctions.test_partition_multi_dim.<locals>.check  s    a~H-C##HQ3Y$7Q3YHZZs 34''		(+ds2C(D(*		#&#,(?A''		(+cd2C(D(*		#&,(?A 5r$   c              3   4  "   V x  V P                   x  \        P                  ! V 4      x  \        P                  ! V \        P                  R 7      x  \        P                  ! V \        P
                  R 7      x  RR\        P
                  ) ^333x  R# 5ir  r%  r
  Nr]  r   ri  	full_liker  r"  rJ   s   &r"   a_variations>TestNPFunctions.test_partition_multi_dim.<locals>.a_variations  i     G##I##A&&,,qRVV44,,qRVV44%"&&!,.00   BBr  r  NNr  r  r  r  )r  r   r   r  r  r"  r  r  r  r"  rr  r0   r@   r   r  r  s   f     @@r"   test_partition_multi_dim(TestNPFunctions.test_partition_multi_dim  s    T"6*		A	1 KK2r"#w!vv!IIi ?C2q\c " #r$   c                l  a aa \         o\        R R7      ! S4      oVVV 3R lpR p\        P                  ! ^^
^04      p\        P                  VR&   \        P
                  ) V^&   \        P
                  V^	&   VP                  R4      pV! V4       F  p\        R^4       F  pV! WE4       K  	  K   	  R# )Tr@  c           
      $  < S! W4      pS! W4      p\         P                  ! V 4      p \         P                  ! V P                  R R 4      pV FI  pSP	                  W,          W%,          V,          ,          W,          W5,          V,          ,          4       KK  	  \         P                  ! VP                  R R 4       F  pSP	                  \         P
                  ! W,          W%,          R V ,          4      \         P
                  ! W,          W5,          R V ,          4      4       SP	                  \         P
                  ! W,          W%,          VR  ,          4      \         P
                  ! W,          W5,          VR  ,          4      4       K  	  R # )Nr  )r   r3  rl  r  r  r  )	r0   r  r  r  r  rM  r  r  r  s	   &&    r"   r"  :TestNPFunctions.test_argpartition_multi_dim.<locals>.check  s   a~H-C

1A**QWWSb\*C''X[-=(>()SVC[(9;  ZZs 34''		!$x{4C7H2I(J(*		!$svds|2D(EG''		!$x{347H2I(J(*		!$svcd|2D(EG 5r$   c              3   4  "   V x  V P                   x  \        P                  ! V 4      x  \        P                  ! V \        P                  R 7      x  \        P                  ! V \        P
                  R 7      x  RR\        P
                  ) ^333x  R# 5iro  rp  rJ   s   &r"   rr  ATestNPFunctions.test_argpartition_multi_dim.<locals>.a_variations  rt  ru  rv  Nrw  r  )r   r   r   r  r  r"  r  r  rx  s   f     @@r"   test_argpartition_multi_dim+TestNPFunctions.test_argpartition_multi_dim  s    T"6*	G	1 KK2r"#w!vv!IIi ?C2q\c " #r$   c                   \         p\        R R7      ! V4      pRp\        R8  d
   RV,           p\        P                  ! ^^
^4      \        P
                  ! R4      3 F  pV F  pV P                  WWE4       K  	  K   	  R# Tr@  N)r  r   r  r  r  TFT)r  r   r   r   r  r9  r  r  r  r  kthsr  r  s   &     r"   test_partition_boolean_inputs-TestNPFunctions.test_partition_boolean_inputs  sn    T"6*6! 4'DQB'2E)FFA++F1B  Gr$   c                   \         p\        R R7      ! V4      pRp\        R8  d
   RV,           p\        P                  ! ^^
^4      \        P
                  ! R4      3 F  pV F  pV P                  WWE4       K  	  K   	  R# r  )r   r   r   r   r  r9  r  r  s   &     r"    test_argpartition_boolean_inputs0TestNPFunctions.test_argpartition_boolean_inputs  sn    T"6*6! 4'DQB'2E)FFA..vaE  Gr$   c                   \         p\        R R7      ! V4      pV P                  4        \        P                  ! ^ ^.^^.^^ ..4      P
                  p\        P                  ! ^4      R3 FR  pV P                  4       ;_uu_ 4       pV! W4R7       RRR4       V P                  R\        XP                  4      4       KT  	  \        P                  \        P                  3 FW  pV P                  \        4      ;_uu_ 4       pV! W4R7       RRR4       V P                  R\        XP                  4      4       KY  	  R FW  pV P                  \        4      ;_uu_ 4       pV! W4R7       RRR4       V P                  R\        XP                  4      4       KY  	  R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     Lb; i)	Tr@                @)r&  Nz)ddof must be a real numerical scalar typez)Cannot convert non-finite ddof to integerzddof must be integral value)r3  gffffff)r"  r   rF  r   r9  r]  rP  r  rD  rB  rE  r  r"  rC  r  )r  r  r  r   r&  rH  s   &     r"   test_cov_invalid_ddof%TestNPFunctions.test_cov_invalid_ddof  sV   T"6* 	!HHq!fq!fq!f-.00IIaL"$D''))Va# *MMEf../1 % FFBFFND"":..&a# /MMEf../1 # D"":..&a# /MM7V=M=M9NO  *)) /. /.s$   
F 
F.
GF+.F>Gc                   a  \        R R7      ! V4      p\        S P                  WRR7      pV 3R lpV! 4        F  pV! W&/4       K  	  R# )Tr@  +=r  c               3     <"   \         P                  ! ^ ^.^^.^^ ..4      P                  x  S P                  P	                  ^d4      P                  ^^4      x  \         P                  ! \         P                  ! ^ ^.^^.^^ ..4      P                  4      x  S P                  P	                  ^d4      P                  ^^4      R,          x  \         P                  ! . R	O4      x  \         P                  ! R
RR7      x  \         P                  ! \         P                  R\         P                  ) RR.4      x  \         P                  ! R^^!4      P                  ^!^4      x  Rx  Rx  Rx  Rx  . ROx  Rx  RR.x  Rx  Rx  \         P                  ! . 4      x  \         P                  ! . 4      P                  ^ ^4      x  \         P                  ! . 4      P                  ^^ 4      x  Rx  R# 5i)r   o_?甇ZӼ?Q|?Tr  r
  N)rk  :NNr  )g&S:?r  g#~j?r  r  ry  r  )皙?皙?g)\(?gRQ?)g
ףp=
?gzG?)r  r  )y        
ףp=
?y        zG?g r  g333333@r  r  )r  r  r  r  )r  r  r  ))r3  皙@r  r  )r   r9  r]  r  randnr  ri  r  r  r"  r  r  s   r"   input_variations=TestNPFunctions.corr_corrcoef_basic.<locals>.input_variations  s    ((QFQFQF34666((..%--a44##BHHq!fq!fq!f-E$F$H$HII((..%--a4V<<((CDD''&T22((BFFFRVVGVVDEE++b!R(00Q77 ;:<<!!OO44i((K$$ ((2,((2,&&q!,,((2,&&q!,,Hs   G:G=N)r   r   r  )r  r  first_arg_namer  r  r  	input_arrs   f&&    r"   corr_corrcoef_basic#TestNPFunctions.corr_corrcoef_basic  sE    T"6*++VEJ	: *+IN./ ,r$   c                8    \         pV P                  VR R7       R# )r!   r  N)r(  r  r  r  s   & r"   test_corrcoef_basic#TestNPFunctions.test_corrcoef_basic;  s       <r$   c                8    \         pV P                  VR R7       R# )r   r  N)r"  r  r  s   & r"   test_cov_basicTestNPFunctions.test_cov_basic@  s       <r$   c                R   \         p\        R R7      ! V4      p\        V P                  WRR7      pV P                  P                  ^i4      P                  ^^4      pRVRRR
1,          3pRpRpRp\        P                  ! WVWx4      p	V	 F  w  rrRVRV
RVRVR	V/pV! V4       K  	  R# )Tr@  r  r  Nr   r#  r&  r%  r$  r  FT)Nr  r   r  r  T)	r"  r   r   r  r  r  r  r  r   )r  r  r  r  r   	y_choicesrowvar_choicesbias_choicesddof_choiceproductsr#  r$  r%  r&  r  s   &              r"   test_cov_explicit_arguments+TestNPFunctions.test_cov_explicit_argumentsE  s    T"6*++VEJHHNN3''A.!DbD'M	$"/$$Y%1@%-!At1c1fddHf6F6N &.r$   c                :   \         p\        R R7      ! V4      p\        V P                  WRR7      pV P                  P                  ^i4      P                  ^^4      pRVRRR1,          3pR	p\        P                  ! WV4       F  w  rxRVRVRV/p	V! V	4       K  	  R# )
Tr@  r  r  Nr!   r#  r$  r  r  )	r(  r   r   r  r  r  r  r  r   )
r  r  r  r  r!   r  r  r#  r$  r  s
   &         r"    test_corrcoef_explicit_arguments0TestNPFunctions.test_corrcoef_explicit_argumentsX  s    T"6*++VEJHHNN3''A.!DbD'M	$"**9EIA1c1h7F6N Fr$   c                   \        R R7      ! V4      p\        V P                  WRR7      p\        P                  ! . R	O4      p\        P                  ! . R
O4      pW%RV/pV! V4       \        P                  ! . RO4      p\        P                  ! . RO.4      pW%RV/pV! V4       \        P                  ! . RO4      pRpW%RV/pV! V4       W&RV/pV! V4       \        P                  ! . RO4      pRpW%RV/pV! V4       W&RV/pV! V4       \        P                  ! . 4      p\        P                  ! . 4      pW%RV/pV! V4       RpRpW%RV/pV! V4       V P
                  P                  ^
^4      p\        P                  ! . R	O4      P                  ^^4      ^
,          pW%RV/pV! V4       \        P                  ! . R	O4      p\        P                  ! . R
O. R
O.4      pW%RV/pV! V4       R FX  p\        P                  ! . R	O4      p\        P                  ! . R
O. R
O. RO.4      pW%RVRV/pV! V4       W&RVRV/pV! V4       KZ  	  R# )Tr@  r  r  r3  r#  r  r$  Nr  )r  r3  Q?r  r0  r  r  )r0  r  r  r  )r  r3  r  )r   r   r  r   r9  r  r  r  )	r  r  r  r  r  r   r#  r  r$  s	   &&&      r"   cov_corrcoef_edge_cases'TestNPFunctions.cov_corrcoef_edge_casesf  s   T"6*++VEJ HH_%HH^$ S!,vHHYHHl^$ S!,vHHY S!,v S!,vHHY S!,v S!,vHHRLHHRL S!,v S!,vHHNN2q!HH_%--a3b8 S!,vHH_%HHnn56 S!,v!F)A...IJA$a6BF6N$a6BF6N "r$   c                    \         pV P                  VR R7       \        RR7      ! V4      p\        V P                  WRR7      p\
        P                  \
        P                  ) R^ 3 F  pR V/pV! V4       K  	  R# )r!   r  Tr@  r  r  r
  N)r(  r  r   r   r  r   r  r"  r  r  r  r  r!   r  s   &     r"   test_corrcoef_edge_cases(TestNPFunctions.test_corrcoef_edge_cases  sj    $$VC$@T"6*++VEJ&&266'5!,A1XF6N -r$   c                    \         p\        R R7      ! V4      p\        V P                  WRR7      pRpRV/pV! V4       R# )Tr@  r  r  r!   N))r1  }Ô%IT)r  r1  )r(  r   r   r  r  s   &     r"   &test_corrcoef_edge_case_extreme_values6TestNPFunctions.test_corrcoef_edge_case_extreme_values  sA    T"6*++VEJ /qvr$   c                    \         pV P                  VR R7       \        RR7      ! V4      p\        V P                  WRR7      p\
        P                  ! ^ ^.^^.^^ ..4      P                  pR VR^/pV! V4       R# )r   r  Tr@  r  r  r&  N)r"  r  r   r   r  r   r9  r]  )r  r  r  r  r   r  s   &     r"   test_cov_edge_cases#TestNPFunctions.test_cov_edge_cases  s{    $$VC$@T"6*++VEJ HHq!fq!fq!f-.00q&!$vr$   c                  a a \         p\        R R7      ! V4      oS P                  4        VV 3R lp\        P                  ! R4      pV! V4       R	pV! V4       . RO..pV! V4       VV 3R lp\        P                  ! R
4      p\        P                  ! R4      pV! W54       \        P
                  ! R4      pRpV! W54       \        P                  ! ^4      p\        P                  ! ^4      pS P                  \        4      ;_uu_ 4       pS! W5R7       RRR4       S P                  R\        XP                  4      4       \        P
                  ! . RO4      P                  ^^4      pS P                  \        4      ;_uu_ 4       pS! V4       RRR4       S P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)Tr@  c                    < SP                  4       ;_uu_ 4       pS! V 4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; i)Nzm has more than 2 dimensionsr  )r   rH  r  r  s   & r"   _check_m5TestNPFunctions.test_cov_exceptions.<locals>._check_m  sC    ''))Va *MM8#f>N>N:OP *)r  c                    < SP                  4       ;_uu_ 4       pS! WR 7       RRR4       SP                  R\        XP                  4      4       R#   + '       g   i     L7; i)rF  Nzy has more than 2 dimensionsr  )r   r#  rH  r  r  s   && r"   _check_y5TestNPFunctions.test_cov_exceptions.<locals>._check_y  sC    ''))Va *MM8#f>N>N:OP *)s   
AA#	rF  Nz$m and y have incompatible dimensionsz/2D array containing a single row is unsupportedr+  r  r  )))r  r9  rl  )r3  r  r3  )))r  r  r  r  )r"  r   rF  r   r  r9  rP  rC  r  rD  rB  rE  r  RuntimeError)r  r  r  r   r  r#  rH  r  s   f      @r"   test_cov_exceptions#TestNPFunctions.test_cov_exceptions  sc   T"6* 	!	Q
 GGI([M	Q
 GGFOGGIHH_%!IIaLIIaLz**f!M +<&**+	-
 HH_%--a3|,,!H -G&**+	- +* -,s   
G 	G G	G#	c           	        \         p\        R R7      ! V4      p\        V P                  W4      pR pR p\        '       d   ^M^pV! \
        P                  ! R^V4      4       FY  pRV/pV! V4       V! V4       F>  p	RVRV	/pV! V4       RVRV	/pV! V4       V! V4       F  p
RVRV	RV
/pV! V4       K  	  K@  	  K[  	  R# )	Tr@  c              3   |   "   R x  V x  \         '       g$   V P                  \        P                  4      x  R # R # 5ir   )r   rJ  r   r  rJ   s   &r"   to_variations9TestNPFunctions.test_ediff1d_basic.<locals>.to_variations  s,     JG"?hhrxx(( #s   :<c              3      "   V x  \         '       g9   V P                  ^^^4      x  V P                  \        P                  4      x  R# R# 5i)r  N)r   r  rJ  r   r  rJ   s   &r"   ary_variations:TestNPFunctions.test_ediff1d_basic.<locals>.ary_variations  s:     G"?ii1a((hhrxx(( #s   AAr+  r-  r,  Nr  )r*  r   r   r  r   r   r  )r  r  r  r  r  r  
array_sizer+  r  r0   r1   s   &          r"   test_ediff1d_basic"TestNPFunctions.test_ediff1d_basic  s    T"6*++V;	)	) */Qr
!"++b!Z"@ACS\F6N"3'j!4vh2v&s+A#S*a1EF6N , (	 Br$   c                2   \         p\        R R7      ! V4      pV P                  4        V P                  4       ;_uu_ 4       pV! \        P
                  ! R4      4       RRR4       RpV\        XP                  4      9   g   Q hR#   + '       g   i     L0; i)Tr@  Nz+Boolean dtype is unsupported (as per NumPy))TTF)r*  r   rF  r  r   r9  rB  rE  )r  r  r  rq  r  s   &    r"   test_ediff1d_exceptions'TestNPFunctions.test_ediff1d_exceptions  ss    T"6* 	!##%%"((./0 & <c!++&&&&	 &%s   BB	c                   \         p\        R R7      ! V4      pR pV! 4        F$  pV! V4      pV! V4      pV P                  WV4       K&  	  V P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  R\        P                  ,          \        XP                  4      4       R#   + '       g   i     LL; i)Tr@  c               3      "   \         P                  ! ^
4      P                  ^^4      x  \         P                  ! ^4      P                  ^^^4      x  Rx  ^^.^^.3x  R# 5i)rN  Nr  r  r  r$   r"   rr  7TestNPFunctions.test_fliplr_basic.<locals>.a_variations-  sU     ))B-''1--))B-''1a00Oq6Aq6##s   A"A$r  NzCannot np.fliplr on %s type)
r   r   r  rC  r   rD  r	   unicode_typerB  rE  r  r  r  rr  r0   r  r  rH  s   &       r"   test_fliplr_basic!TestNPFunctions.test_fliplr_basic)  s    T"6*	$ AayH(C##H2  
 {++v%L , 	3e6H6HH&**+	- ,+   (	B55C	c                   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! \
        P                  ! ^4      4       RRR4       V P                  R\        XP                  4      4       V P                  R\        VP                  4      4       R#   + '       g   i     L\; i)Tr@  Ncannot index arrayzwith 2 indices)
r   r   rF  rC  r   r   rP  rD  rB  rE  rG  s   &   r"   test_fliplr_exception%TestNPFunctions.test_fliplr_exception>  s    T"6* 	!{++v"))A, , 	*C0@0@,AB&F,<,<(=>	 ,+s   B77C	c                   \         p\        R R7      ! V4      pR pV! 4        F$  pV! V4      pV! V4      pV P                  WV4       K&  	  V P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  R\        P                  ,          \        XP                  4      4       R#   + '       g   i     LL; i)Tr@  c               3     "   ^.x  \         P                  ! ^
4      x  \         P                  ! ^
4      P                  ^^4      x  \         P                  ! ^4      P                  ^^^4      x  Rx  ^^.^^.3x  R# 5i)r  Nr  r  r  r$   r"   rr  7TestNPFunctions.test_flipud_basic.<locals>.a_variationsO  sj     #I))B-))B-''1--))B-''1a00Oq6Aq6##s   A?Br  NzCannot np.flipud on %s type)
r   r   r  rC  r   rD  r	   r  rB  rE  r  s   &       r"   test_flipud_basic!TestNPFunctions.test_flipud_basicK  s    T"6*	$ AayH(C##H2  
 {++v%L , 	3e6H6HH&**+	- ,+r  c                l   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! ^4       RRR4       V P                  R\        XP                  4      4       V P                  R\        VP                  4      4       R#   + '       g   i     L\; i)Tr@  Nr  zwith 1 indices)r   r   rF  rC  r   rD  rB  rE  rG  s   &   r"   test_flipud_exception%TestNPFunctions.test_flipud_exceptionb  s    T"6* 	!{++v!H , 	*C0@0@,AB&F,<,<(=>	 ,+s   	B##B3	c                f   \         p\        R R7      ! V4      pR pV! 4        F$  pV! V4      pV! V4      pV P                  WV4       K&  	  V P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)Tr@  c               3     "   \         P                  ! ^4      x  \         P                  ! ^
4      x  \         P                  ! ^
4      P                  ^^4      x  \         P                  ! ^4      P                  ^^^4      x  R# 5ir  Nr  r  r$   r"   rr  5TestNPFunctions.test_flip_basic.<locals>.a_variationss  sY     ((1+))B-))B-''1--))B-''1a00s   BBNzCannot np.flip on UniTupler  )r   r   r  rC  r   rD  rB  rE  r  s   &       r"   test_flip_basicTestNPFunctions.test_flip_basico  s    T"6*	1 AayH(C##H2  
 {++v) , 	2C8H8H4IJ ,+s   (	B  B0	c                    R  p\         p\        RR7      ! V4      pV! 4        F1  w  rE\        P                  P	                  V! WE4      V! WE4      4       K3  	  R# )c               3     "   Rx  Rx  Rx  Rx  R	x  R
x  Rx  Rx  R\         P                  3x  R\         P                  3x  \        R8  Ed   \         P                  ! ^4      \         P                  ! ^4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! ^4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  R# R# 5ir  r'  r  r  N)r  <   )r  r  )r  r  r  )r  r  r%        N@      Nr&  )r&  r  r  r         ?       @      @      @      ?             @                   @r   rq  pir   r  r  r$   r"   r  4TestNPFunctions.test_logspace2_basic.<locals>.inputs      KLMMLOrtt)Oruu*v%ll1or||A66ll2&R(888ll1or||B'777ll6*BLL,@@@ll6*BLL,@@@ll7+R\\&-AAA &   E-E/Tr@  N)r   r   r   rM  assert_allcloser  r  r  r  r   r   s   &     r"   test_logspace2_basic$TestNPFunctions.test_logspace2_basic  J    	B( T"6*!8KEJJ&&ve':E%<NO $r$   c                   \        R R7      ! \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^R4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)Tr@  r  N+The first argument "start" must be a number+The second argument "stop" must be a number)r   r   rF  rC  r   rD  rB  rE  r  r  rH  s   &  r"   test_logspace2_exception(TestNPFunctions.test_logspace2_exception  s    T"9-!{++v%O ,C&**+	- {++v!UO ,C&**+	- ,+
 ,+s   
C
C$C!	$C4	c                    R  p\         p\        RR7      ! V4      pV! 4        F1  w  rE\        P                  P	                  V! WE4      V! WE4      4       K3  	  R# )c               3     "   Rx  Rx  Rx  Rx  R	x  R
x  Rx  Rx  R\         P                  3x  R\         P                  3x  \        R8  Ed   \         P                  ! ^4      \         P                  ! ^4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! ^4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  R# R# 5ir  r  r  r$   r"   r  4TestNPFunctions.test_logspace3_basic.<locals>.inputs  r  r  Tr@  Nr   r   r   rM  r  r  s   &     r"   test_logspace3_basic$TestNPFunctions.test_logspace3_basic  r  r$   c           	         R  p\         p\        RR7      ! V4      pV! 4        F4  w  rEp\        P                  P	                  V! WEV4      V! WEV4      4       K6  	  R# )c               3     "   Rx  Rx  Rx  Rx  R	x  R
x  Rx  Rx  R\         P                  ^3x  R\         P                  ^3x  \        R8  Ed   \         P                  ! ^4      \         P                  ! ^4      ^(3x  \         P                  ! R4      \         P                  ! R4      ^23x  \         P                  ! ^4      \         P                  ! R4      ^<3x  \         P                  ! R4      \         P                  ! R4      ^F3x  \         P                  ! R4      \         P                  ! R4      ^P3x  \         P                  ! R4      \         P                  ! R4      ^Z3x  R# R# 5i)r  r'  r  r  N)r  r  rI  )r  r  r  )r  r  (   r  r  2   )r  r  r  r%  r  F   r  r&  P   )r&  r  Z   r  r  r  r  r	  r
  r  r  r$   r"   r  =TestNPFunctions.test_logspace3_with_num_basic.<locals>.inputs  s    O!!  rttR-ruub. v%ll1or||A::ll2&R(8"<<ll1or||B'7;;ll6*BLL,@"DDll6*BLL,@"DDll7+R\\&-A2EE &s   E5E7Tr@  Nr  r  r  r  r  r   r   r   s   &      r"   test_logspace3_with_num_basic-TestNPFunctions.test_logspace3_with_num_basic  sU    	F( T"6* &EJJ&&ve3'?',U#'>@ !)r$   c                   \        R R7      ! \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^R4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^ ^R4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)Tr@  r  Nr  r  z+The third argument "num" must be an integer)r   r   rF  rC  r   rD  rB  rE  r  s   &  r"   test_logspace3_exception(TestNPFunctions.test_logspace3_exception  s    T"9-!{++v%O ,C&**+	- {++v!UO ,C&**+	- {++v!Q ,C&**+	- ,+
 ,+
 ,+s$   
D&
D9,E&D6	9E		E	c                    R  p\         p\        RR7      ! V4      pV! 4        F%  w  rEV P                  V! WE4      V! WE4      RR7       K'  	  R# )c               3     "   Rx  Rx  R
x  Rx  Rx  Rx  Rx  R\         P                  ! R4      3x  \         P                  ! R4      R3x  R	\         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! ^4      \         P                  ! ^4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! ^4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  \         P                  ! R4      \         P                  ! R4      3x  R# 5i)r  r  r0               @@r  Nr  r   r  r&  r  )r  r*  )r*  r  )r     )r  r.  r-  r  r  r  r	  r
  r   r  r  r$   r"   r  5TestNPFunctions.test_geomspace2_basic.<locals>.inputs  sJ    MOMMLObll2&&&,,r"B&&R(((,,r"BLL$777,,w'f)===,,q/2<<?22,,r"BLL$444,,q/2<<#333,,v&V(<<<,,v&V(<<<,,w'f)===s   GGTr@  g-q=r  N)r   r   r  r  s   &     r"   test_geomspace2_basic%TestNPFunctions.test_geomspace2_basic  sP    	>* T"6*!8KE##F5$7$)%$6,1 $ 3 $r$   c                   \        R R7      ! \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^R4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^ ^4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^ 4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL4; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lq; i)Tr@  r  N%The argument "start" must be a number$The argument "stop" must be a number&Geometric sequence cannot include zero)	r   r   rF  rC  r   rD  rB  rE  r  r  s   &  r"   test_geomspace2_exception)TestNPFunctions.test_geomspace2_exception  sB   T":.!{++v%O ,=&**+	- {++v!UO ,<&**+	- z**f!QK +>&**+	- z**f!QK +>&**+	-# ,++
 ,+
 +*
 +*s0   
E9
F,
F  
F39F
	F	 F0	3G	c           	         R  p\         p\        RR7      ! V4      pV! 4        F(  w  rEpV P                  V! WEV4      V! WEV4      RR7       K*  	  R# )c               3     "   Rx  Rx  R
x  Rx  Rx  Rx  Rx  Rx  R\         P                  ! R4      ^
3x  \         P                  ! R4      R^3x  R	\         P                  ! R4      ^3x  \         P                  ! R4      \         P                  ! R4      ^3x  \         P                  ! R4      \         P                  ! R4      ^3x  \         P                  ! ^4      \         P                  ! ^4      ^(3x  \         P                  ! R4      \         P                  ! R4      ^23x  \         P                  ! ^4      \         P                  ! R4      ^<3x  \         P                  ! R4      \         P                  ! R4      ^F3x  \         P                  ! R4      \         P                  ! R4      ^P3x  \         P                  ! R4      \         P                  ! R4      ^Z3x  R# 5i)r  r  r0  r4  r  Nr  r$  r&  r&  r(  )r  r*  r  )r  r*  r  )r*  r  r  )r  r5  r  )r6  r  r  r.  r-  r  r  r  r	  r
  r7  r  r$   r"   r  5TestNPFunctions.test_geomspace3_basic.<locals>.inputs5  sk    !!Obll2&**,,r"B**R(",,,,r"BLL$7::,,w'f)=q@@,,q/2<<?B66,,r"BLL$4b88,,q/2<<#3R77,,v&V(<b@@,,v&V(<b@@,,w'f)=rAAs   G,G.Tr@  r  r  N)r   r   r  r,  s   &      r"   test_geomspace3_basic%TestNPFunctions.test_geomspace3_basic3  sX    	B, T"6* &E##F5$<$)%s$;,1 $ 3 !)r$   c                h   \        R R7      ! \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R^^
4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^R^
4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^
R4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^ ^^4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^ ^4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     ELK; i  + '       g   i     EL
; i  + '       g   i     L; i  + '       g   i     L; i)Tr@  r  Nr<  r=  z%The argument "num" must be an integerr>  )	r   r   rF  rC  r   rD  rB  rE  r  r  s   &  r"   test_geomspace3_exception)TestNPFunctions.test_geomspace3_exceptionS  s   T":.!{++v%B ,=&**+	- {++v!UB ,<&**+	- {++v!R ,=&**+	- z**f!QN +>&**+	- z**f!QN +>&**+	-- ,++
 ,++
 ,++
 +*
 +*s<   GG&.G:HH!G#	&G7	:H	H	!H1	c           	     	   \        R R7      ! \        4      p\        R R7      ! \        4      p\        pV! ^R4      pV P                  \	        V4      ^24       V! ^R^dR7      pV P                  VR,          R4       V! ^R^R7      pV P                  WC! ^R^R7      4       V! ^^^R7      pV P                  WC! ^^^R7      4       T P                  VP                   Uu. uF  qU^ 8H  NK	  	  up4       V! RR^R7      pV P                  WC! RR^R7      4       T P                  VP                   Uu. uF  qU^ 8H  NK	  	  up4       V! RR^R7      pV P                  WC! RR^R7      4       T P                  VP                   Uu. uF  qU^ 8H  NK	  	  up4       RpRpV! Wg^R7      pV P                  V^ ,          V4       V! Wg^R7      pV P                  V^ ,          V4       V P                  VR,          V4       \        P                  ! RR7      ;_uu_ 4        V! R^^R7      pRRR4       V P                  V^ ,          R4       V P                  \        P                  ! V^R 4      P                  4       4       V P                  V^,          R	4       V! R
R^R7      pV P                  WC! R
R^R7      RR7       T P                  VP                   Uu. uF  qU^ 8H  NK	  	  up4       V! RR^R7      pV P                  WC! RR^R7      RR7       T P                  VP                   Uu. uF  qU^ 8H  NK	  	  up4       V! RR^R7      pV P                  VV! RR^R7      RR7       V! RR^R7      pV P                  VV! RR^R7      RR7       \        R8  d&   V! RR^R7      pV P                  WC! RR^R7      4       V! RR^4      pV P                  WC! RR^4      RR7       V! RR ^4      pV P                  WC! RR ^4      RR7       V! RR!^4      pV P                  WC! RR!^4      RR7       V! RR^4      pV P                  WC! RR^4      RR7       V! R"R#^4      pV P                  WC! R"R#^4      RR7       V! RR$^4      pV P                  WC! RR$^4      4       V! R$R^4      pV P                  WC! R$R^4      4       R# u upi u upi u upi   + '       g   i     EL; iu upi u upi )%Tr@  r4  r   r  gL4@ignore)invalidNr  r0  y              0@r  r  vIh%<=r  gV瞯<r  r3  ir  g      y             y            @tr  y     @@     @@y            ?y     @     @@r  r.  r-  y              r  y              y             y      @      @r,  )r   r   r   r~  r8  r  r:  imagr   errstaterE  rY  realr   )r  cfunc2cfunc3pfunc3r#  r!   r   r   s   &       r"   test_geomspace_numpy$TestNPFunctions.test_geomspace_numpyq  s   d#J/d#J/ 1cNQ$1cs#2(1cq!6!CQ#781aQ6!QA#670Aa012t#6"d#:;0Aa014#6$#:;0Aa01 5A&!e,5A&!e,"t, [[**r1!$A + 	!d+1R)--/0!c* 2s"6"cq#95I0Aa0131%6#u!#<eL0Aa016<Q/ &v| C(- 	  	/ 7Mq1 &w1 E(- 	  	/
 6!wA.A##Avgv1'EF67A&6&'1#=uM661%6&&!#<eL7FA&6'61#=uM67A&6&'1#=uM7FA&6'61#=uM2r16"b!#452r16"b!#45I 1 1 1 +** 1 1s*   R=0SSSS (S%S	c                    \         p\        R R7      ! V4      pR pV! 4        F$  pV! V4      pV! V4      pV P                  WV4       K&  	  R# )Tr@  c               3     "   \         P                  ! ^
4      P                  ^^4      x  \         P                  ! ^4      P                  ^^^4      x  \         P                  ! ^@4      P                  ^^^^^^4      x  R# 5irv  r  r  r$   r"   rr  6TestNPFunctions.test_rot90_basic.<locals>.a_variations  `     ))B-''1--))B-''1a00))B-''1aAq99   B BN)r   r   r  )r  r  r  rr  r0   r  r  s   &      r"   test_rot90_basic TestNPFunctions.test_rot90_basic  sI    T"6*	:
 AayH(C##H2  r$   c                    \         p\        R R7      ! V4      pR pV! 4        F7  p\        R^4       F$  pV! WE4      pV! WE4      pV P                  Wg4       K&  	  K9  	  R# )Tr@  c               3     "   \         P                  ! ^
4      P                  ^^4      x  \         P                  ! ^4      P                  ^^^4      x  \         P                  ! ^@4      P                  ^^^^^^4      x  R# 5irv  r  r  r$   r"   rr  =TestNPFunctions.test_rot90_with_k_basic.<locals>.a_variations  rX  rY  Nr,  )r   r   r  r  )r  r  r  rr  r0   r   r  r  s   &       r"   test_rot90_with_k_basic'TestNPFunctions.test_rot90_with_k_basic  sY    T"6*	:
 A2q\!!<Ak''6 "  r$   c                0   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      P                  ^^4      RR7       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L^; i)Tr@  r  Nz'The first argument "m" must be an arrayrF  z*The second argument "k" must be an integerzInput must be >= 2-d.)r   r   rF  rC  r   rD  rB  rE  r   rP  r  rG  s   &   r"   test_rot90_exception$TestNPFunctions.test_rot90_exception  s   T"6* 	!{++v%L , 	?&**+	- {++v"))A,&&q!,6 , 	B&**+	- {++v"))A, , 	-s63C3C/DE ,++ ,+ ,+s$   	E/E2FE/	2F	F	c                    Tp\        R R7      ! V4      pR pV! 4        F8  pV! V!  pV! V!  p\        P                  P                  V\	        V4      4       K:  	  R# )Tr@  c               3   ,  "   \         P                  ! ^d4      p V ^3x  V ^^ 3x  V . RO3x  \        V 4      . RO3x  \        V 4      . RO3x  V . RO^ 3x  \        V 4      . RO^ 3x  \        V 4      . RO^ 3x  \         P                  ! ^@4      P	                  ^^^4      p V ^3x  V ^^ 3x  V ^^3x  V . RO3x  V . RO^3x  V . RO^3x  V ^^.3x  V ^^.^3x  V ^^.^3x  V ^.R3x  V ^.R3x  V ^.R3x  V \         P
                  ! . \         P                  R7      ^ 3x  \         P                  ! ^d4      P	                  ^R4      p V ^3x  V ^^ 3x  V ^.^ 3x  V ^2^3x  V \         P                  ! ^
^2^
4      ^3x  V R3x  V \         P                  ! ^4      ^
33x  \         P
                  ! . 4      p V ^3x  V ^3x  V R	^ 3x  V ^^ 3x  \         P
                  ! . .4      p V ^3x  V R	^3x  V ^^ 3x  V ^^3x  R# 5i)
d   r7  N)r  r  H   )r  r  r+  r  r  r  r  r  )r   rP  r  r  r  r9  r  r  rJ   s    r"   args_variations5TestNPFunctions._check_split.<locals>.args_variations  s>    		#AQ$JQ'MZ-q':%%(J&&Z""q':q(((J))		"%%aA.AQ$JQ'MQ'MY,Y/!Y/!aV)OaVQ,aVQ,aS"*aS"*aS"*RXXb1144		#&&q"-AQ$JQ'MaS!)OR(NRYYr2r*A--T'Mbhhqk2&&&AQ$JQ$JVQ,Q'M"AQ$JVQ,Q'MQ'Ms   HHNr   r   rM  assert_equalr  r  r  r  r  ri  rn   r  r  s   &&      r"   _check_splitTestNPFunctions._check_split  sU    T"6*-	^ $%Dt}H,CJJ##Hd3i8	 &r$   c                    Tp\        R R7      ! V4      pR pV! 4        F8  pV! V!  pV! V!  p\        P                  P                  V\	        V4      4       K:  	  R# )Tr@  c               3   "  "   \         P                  ! ^4      ^3x  \        \         P                  ! ^4      4      ^3x  \        \         P                  ! ^4      4      ^3x  \         P                  ! ^4      P	                  ^^4      ^3x  R# 5i)r  N)r   rP  r  r  r  r  r$   r"   ri  ;TestNPFunctions._check_array_split.<locals>.args_variations;  sg     ))A,/!ryy|$a''		!%q(())B-''A.11s   BBNrk  rm  s   &&      r"   _check_array_split"TestNPFunctions._check_array_split6  sT    T"6*	2 $%Dt}H,CJJ##Hd3i8	 &r$   c                Z    V P                  \        4       V P                  \        4       R # r   )rn  r   rs  r  s   &r"   test_array_split_basic&TestNPFunctions.test_array_split_basicG  s    +&,r$   c                v   V P                  \        4       V P                  4        V P                  \        4      ;_uu_ 4       p\        \        4      ! \        P                  ! ^4      ^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       p\        \        4      ! \        P                  ! ^4      ^.RR7       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)r+  Nz0array split does not result in an equal divisionr=   z%np.split: Argument axis out of boundsr  )rn  r   rF  rC  r  r   r   r  rD  rB  rE  )r  rH  s   & r"   test_split_basic TestNPFunctions.test_split_basicK  s    % !z**fK
A& +>  !	

 z**fK
QCb1 +=&**+	- +* +*s   +D8.D(D%	(D8	c           
     4   R  pR pR pV! 4       V! 4       V! 4       .p\         ^R3\        ^R3\        ^R33 F\  w  rVpTp\        V4      p	\	        V^4       F9  p
WJ^,
          ,           F#  w  rV P                  V! W4      V	! W4      4       K%  	  K;  	  K^  	  R# )c               3   ~   "   \         P                  ! . RO4      ^3x  \         P                  ! . RO4      ^3x  R# 5i)r  Nr  r%  rq  r        @r  r  r$   r"   inputs1D5TestNPFunctions.test_vhdsplit_basic.<locals>.inputs1D_  s.     ((<(!++((+,a//s   ;=c               3   d  "   \         P                  ! . RO. RO.4      ^3x  \         P                  ! . RO. RO.4      ^3x  \         P                  ! R4      P                  ^^4      ^3x  \         P                  ! R4      P                  ^^4      \         P                  ! ^^.4      3x  \         P                  ! R4      P                  ^^4      ^^.3x  \         P                  ! R4      P                  ^^4      R3x  \         P                  ! R4      P                  ^^^4      ^3x  R# 5i)r        0@r  Nr  r}  r  r  r  r  r$   r"   inputs2D5TestNPFunctions.test_vhdsplit_basic.<locals>.inputs2Dd  s     ((L,78!;;((,.>?@!CC))D/))!Q/22))D/))!Q/1a&1AAA))D/))!Q/!Q77))D/))!Q/77))C.((Aq1144s   D.D0c               3   8  "   \         P                  ! . RO. RO.. RO. RO..4      ^3 \         P                  ! R4      P                  ^^^4      ^3x  \         P                  ! R4      P                  ^^^4      \         P                  ! ^^.4      3x  \         P                  ! R4      P                  ^^^4      ^^.3x  \         P                  ! R4      P                  ^^^4      R3x  \         P                  ! R4      P                  ^^^4      ^3x  R# 5i)r  r  r  Nr  r  r  r  r$   r"   inputs3D5TestNPFunctions.test_vhdsplit_basic.<locals>.inputs3Dn  s     HH|#%##%& ' )** ))D/))!Q2A55))D/))!Q2BHHaV4DDD))D/))!Q2QF::))D/))!Q2F::))C.((Aq1144s   DDr   r   r   N)r   r   r   r   r  r  )r  r  r  r  r  fmindimnamer  r  r  r0   r   s   &            r"   test_vhdsplit_basic#TestNPFunctions.test_vhdsplit_basic[  s    	0
	5
	5 *hj(*5#)1h"7#)1h"7#)1h"7"9Q FLE61%%+E]]MA++F1,A,1!,@B &3 &"9r$   c           
     j   \         ^R3\        ^R3\        ^R33 EF  w  rp\        RR7      ! V4      pV P	                  4        V P                  \        4      ;_uu_ 4       pV! ^^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! R^4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! . RO. RO.4      R4       RRR4       V P                  R	\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      ^4       RRR4       V P                  VR
,           \        V4      ,           R,           \        VP                  4      4       EK  	  R#   + '       g   i     EL; i  + '       g   i     ELE; i  + '       g   i     L; i  + '       g   i     L; i)r  r   r   r   Tr@  Nz#The argument "ary" must be an arrayr  z:The argument "indices_or_sections" must be int or 1d-arrayz only works on arrays of z or more dimensionsr  )r   r   r   r   rF  rC  r   rD  rB  rE  r   r9  r  )r  r  r  r  r  rH  s   &     r"   test_vhdsplit_exception'TestNPFunctions.test_vhdsplit_exception  s   #)1h"7#)1h"7#)1h"7"9Q &q)E##%"";//6a 0MM?f../1"";//6eQ 0MM?f../1"";//6bhhl;<eD 0MM &f../1 "":..&bhhqk1% /MM$!<<s6{J/0f../1)"9
 0// 0// 0/
 /.s0   !
G'5
G;	$H7H"'G8;HH"H2c                    \         p\        R R7      ! V4      pR pR pV! 4        F2  pV! 4        F$  pV! WV4      pV! WV4      pV P                  Wx4       K&  	  K4  	  R# )Tr@  c               3     "   \         P                  ! ^4      x  \         P                  ! ^<4      P                  ^^^4      x  . ROx  Rx  Rx  ^x  Rx  \         P                  ! \         P                  ! R\         P
                  .\         P                  R..4      4      x  \         P                  ! . 4      x  Rx  R# 5i)	r  r3  Fg333333@N)r3  r  r  r  )r  r  )r   rP  r  ri  r9  r  r"  r  r$   r"   rr  5TestNPFunctions.test_roll_basic.<locals>.a_variations  s     ))A,))I&..q!Q77!!%%KGJ##BHHsBFFmbffc]-K$LMM((2,H   CCc                  X    \         P                  P                  R\        R^
4      34      # )Tr  r5  r(  r  r$   r"   shift_variations9TestNPFunctions.test_roll_basic.<locals>.shift_variations  s,    ??00-27R.2B C Cr$   N)r/  r   r  )	r  r  r  rr  r  r0   r0  r  r  s	   &        r"   test_roll_basicTestNPFunctions.test_roll_basic  s]    T"6*
		C A)+!!+Ao''6 ,  r$   c                F   \         p\        R R7      ! V4      pV P                  4        R F_  pV P                  4       ;_uu_ 4       pV! \        P
                  ! ^
4      V4       RRR4       RpV\        XP                  4      9   d   K_  Q h	  R#   + '       g   i     L4; i)Tr@  Nzshift must be an integer)r3  r  )r/  r   rF  r  r   rP  rB  rE  )r  r  r  r0  rq  r  s   &     r"   test_roll_exceptions$TestNPFunctions.test_roll_exceptions  s{    T"6* 	! E''))QbiimU+ * -C#akk**** !))s   BB c           	     	   \         p\        R R7      ! V4      p\        V P                  W4      p\        P
                  ! ^
4      pV P                  P                  V4       \        '       d   \        R^4      M\        R^4      pV F  pWF8  pV! RVRV/4       K  	  \        '       d(   \        P
                  ! ^4      P                  ^^4      pM'\        P
                  ! ^<4      P                  ^^^4      pVR8  pV! RVRV/4       Rp\        P                  ! ^4      P                  4       pV! RVRV/4       . ROp. ROpV! RVRV/4       \        P                  ! R^
^4      pR R\        P                  RRR^RR3	p\        '       do   \        P                   ! \        P"                  ! V^4      ^
4       F=  pV! RVRVR,          /4       V! R\        P$                  ! V4      RVR,          /4       K?  	  MZ\        P"                  ! V^4       F?  pV! RVRV/4       V! R\        P$                  ! V4      P                  ^^4      RV/4       KA  	  \        P$                  ! . RO4      p\        P$                  ! . 4      pV! RVRV/4       \        P$                  ! . RO4      p\        P$                  ! . RO4      pV! RVRV/4       \        P$                  ! . RO. RO.4      p. ROpV! RVRV/4       \        P$                  ! . RO. RO.4      p\        P$                  ! . RO4      P                  ^^^4      pV! RVRV/4       \        P&                  ! \        P
                  ! ^<4      P                  ^^^4      4      p\        P(                  ! R^4      pV! RVRV/4       V! RVRVR	R	R1,          /4       \        P$                  ! ^4      pR F  pV! RVRV/4       K  	  ^p^pV! RVRV/4       \        P$                  ! ^4      p\        P$                  ! R R.4      pV! RVRV/4       \        P
                  ! ^4      p\        P$                  ! . RO4      P                  ^^4      R
,          pV! RVRV/4       R	# )Tr@  rB  r@   g@Fr%  y              ?:Nr  NNr0  r  r  r  r  )r  r  r  r+  r  )r3  r  r  r  r  r  r&  g333333)r  r   r  r   )r  r   r  r   r  r   )r  r   r  r   r  r   r   r   r5  )r  r   r  r   r   r   )rA  r   r   r  r   rP  r  r  r   r  r  eyeflattenr  r  r  islicecombinations_with_replacementr9  ri  rk  )	r  r  r  r  r0   threshold_range	thresholdr	  r  s	   &        r"   test_extract_basic"TestNPFunctions.test_extract_basic  s   T"6*++V;IIbM*9/%A,uR}(I=DKua01 ) ?		"%%a+A		"%%aA.A3wT5!,--vvay  "T5!,- T5!,-KKB"eRVVRtQTJ?!((;;L!L T5!B%89RXXd^UAbEBC	 "?? !%T5!45RXXd^%;%;Aq%A5!LM%
 HHYxx|T5!,-HHYxx%T5!,-HHi+,!T5!,-HHi+,xx0199!QBT5!,-biim33Aq!<=yy$T5!,-T5!DbD'23HHQKDKua01  T5!,-HHQKxxu&T5!,-IIaLxx*+33Aq9B>T5!,-r$   c                j  a a \         p\        R R7      ! V4      oS P                  4        \        P                  ! . 4      p\        P                  ! . RO4      pS P                  \        4      ;_uu_ 4       pS! W24       RRR4       S P                  R\        XP                  4      4       VV 3R lp\        P                  ! . RO. RO.4      p. ROpV! W24       \        P                  ! . RO4      p\        P                  ! . RO4      pV! W24       \        P                  ! ^<4      pRpV! W24       \        P                  ! ^4      p\        P                  ! . R	O4      pV! W24       \        P                  ! ^4      p\        P                  ! . R
O4      pV! W24       R#   + '       g   i     EL+; i)Tr@  Nz"Cannot extract from an empty arrayc                    < R pSP                  \        4      ;_uu_ 4       pS! W4       RRR4       SP                  V\        XP                  4      4       R#   + '       g   i     L7; i)z+condition shape inconsistent with arr shapeNr  )r	  r0   r  rq  r  r  s   &&  r"   r  7TestNPFunctions.test_extract_exceptions.<locals>._check$  sG    ?C"":..!d /MM#s1;;/0 /.s   	AA)	r  )r  r   r  r   r  r   r  )r  r   r  r   r  r5  )TFFFT)TFTFFTF)rA  r   rF  r   r9  rC  r  rD  rB  rE  rP  )r  r  r0   r	  rq  r  r  s   f     @r"   test_extract_exceptions'TestNPFunctions.test_extract_exceptions  s+   T"6* 	!HHRLxx	"z**a$N +:C<LM	1 HHi+,$tHHYxx(tHHRLtIIaLxx9:tIIaLxxFGt9 +**s   6	F!!F2	zNew in numpy 2.0+c                2    V P                  \        R 7       R# )r  N)test_np_trapz_basicrW  r  s   &r"   test_np_trapezoid_basic'TestNPFunctions.test_np_trapezoid_basic>  s       5r$   znp.trapz removed in NumPy 2.4+c                   \        R R7      ! V4      p\        V P                  W4      p. R	OpV! RV/4       R
pV! RV/4       \        P                  ! ^4      P                  ^^4      pV! RV/4       \        P                  ! R^
^<4      P                  ^^^4      pV! RV/RR7       V P                  P                  V4       V! RV/RR7       \        P                  ! . 4      pV! RV/4       \        P                  ! R\        P                  \        P                  \        P                  ) ^.4      pV! RV/4       \        P                  ! ^4      \        P                  ! ^ ^
^4      R,          ,           pV! RV/4       \        P                  ! . \        P                  R7      pV! RV/4       RpV! RV/4       R# )Tr@  r#  rL  r  r
  r0  r7  Nr  )r  r  r  r  r  r5  r  )r   r   r  r   rP  r  r  r  r  r9  r  r"  r:  r  r  r  r  r#  s   &&   r"   r  #TestNPFunctions.test_np_trapz_basicB  sg   T"6*++V;QxQxIIbM!!!Q'QxKKR$,,Q15Qx'Qx'HHRLQxHHeRVVRVVbffWa89QxIIbMBKK2r2R77QxHHRr}}-QxQxr$   c                2    V P                  \        R 7       R# r  )test_np_trapz_x_basicrY  r  s   &r"   test_np_trapezoid_x_basic)TestNPFunctions.test_np_trapezoid_x_basice  s    ""."9r$   c                   \        R R7      ! V4      p\        V P                  W4      p. ROp. ROpV! RVRV/4       . R	OpR
pV! RVRV/4       R	p. ROpV! RVRV/4       \        P                  ! . R	O4      p^^.pV! RVRV/4       \        P                  ! . 4      p\        P                  ! ^^.4      pV! RVRV/4       R	pRpV! RVRV/4       \        P
                  ! ^4      P                  ^^4      p\        P                  ! ^^.4      pV! RVRV/4       \        P
                  ! ^4      P                  ^^4      p\        P                  ! . RO4      pV! RVRV/4       \        P
                  ! ^<4      P                  ^^^4      p\        P                  ! ^^.4      pV! RVRV/4       \        P
                  ! ^<4      P                  ^^^4      p\        P                  ! . RO4      pV! RVRV/4       \        P
                  ! ^<4      P                  ^^^4      pV P                  P                  V4       VR,           pV P                  P                  V4       V! RVRV/4       \        P
                  ! ^4      pV\        P                  ! ^ ^
^4      R,          ,           pV! RVRV/4       \        P                  ! . RO4      p\        P                  ! RR.4      pV! RVRV/4       R# )Tr@  r#  r!   Nr3  r0  r  r  r  r  r  )r  r  r  r+  r  r  r  r	  )r  r+  r  r  r  )
r   r   r  r   r9  rP  r  r  r  r  )r  r  r  r  r#  r!   s   &&    r"   r  %TestNPFunctions.test_np_trapz_x_basici  s   T"6*++V;QQ QQ QQ HH_%FQQ HHRLHHaVQQ QQ IIbM!!!Q'HHaVQQ IIbM!!!Q'HH\"QQ IIbM!!!Q*HHaVQQ IIbM!!!Q*HHYQQ IIbM!!!Q*GQQ IIbMAr2&++QQ HHYHHff%&QQ r$   c                2    V P                  \        R 7       R# r  )test_trapz_numpy_questionablerW  r  s   &r"   !test_trapezoid_numpy_questionable1TestNPFunctions.test_trapezoid_numpy_questionable  s    **,*?r$   zNumPy behaviour questionablec                   \        R R7      ! V4      p\        V P                  W4      p\        P                  ! . RO4      P                  \        4      pV! RV/4       \        P                  ! . RO4      pV! RV/4       R# )Tr@  r#  N)TFTT)r   r   r  r   r9  rJ  r  r  s   &&   r"   r  -TestNPFunctions.test_trapz_numpy_questionable  sj     T"6*++V; HH./66s;Qx HH./Qxr$   c                2    V P                  \        R 7       R# r  )test_np_trapz_dx_basicr\  r  s   &r"   test_np_trapezoid_dx_basic*TestNPFunctions.test_np_trapezoid_dx_basic  s    ##?#;r$   c                   \        R R7      ! V4      p\        V P                  W4      p. R
Op^pV! RVRV/4       . ROp. ROpV! RVRV/4       . ROp. ROpV! RVRV/4       \        P                  ! R^^
4      p\        P
                  pV! RVRV/4       \        P                  ! R^^
4      p\        P                  pV! RVRV/4       \        P                  ! R^^
4      p\        P                  ! R^^	4      pV! RVRV/RR7       \        P                  ! ^<4      P                  ^^^4      R,          p\        P                  ! ^(4      P                  ^^^4      pV! RVRV/4       \        P                  ! R^
R4      pV! \        P                  ! RV^,          ,          4      \        P                  ! ^\        P                  ,          4      ,          RR7      p\        P                  P                  V^^4       \        P                  ! ^4      pRpV! RVRV/4       \        P                  ! ^4      p\        P                  ! ^.4      pV! RVRV/4       R	# )Tr@  r#  rN  rL  r  r0  r  rM  Nr  r  )r  r  r+  r  r  r5  r*  )r   r   r  r   r  r  r"  rP  r  exprX  r  rM  assert_almost_equalr9  )r  r  r  r  r#  rN  r!   rw  s   &&      r"   r  &TestNPFunctions.test_np_trapz_dx_basic  s   T"6*++V;Qb!"Qb!"Qb!"KKAr"VVQb!"KKAr"VVQb!"KKAr"[[Q"Qb!51IIbM!!!Q*R/YYr]""1a+Qb!"IIc2r""&&qAv&RUU);;D


&&q!Q/IIbMQb!"IIbMXXqc]Qb!"r$   c                2    V P                  \        R 7       R# r  )test_np_trapz_x_dx_basicr^  r  s   &r"   test_np_trapezoid_x_dx_basic,TestNPFunctions.test_np_trapezoid_x_dx_basic  s    %%->%?r$   c           	        \        R R7      ! V4      p\        V P                  W4      pR^\        P                  ! . RO4      3 F  p. ROp. R	OpV! RVRVRV/4       . ROp^^.pV! RVRVRV/4       . ROp. R
OpV! RVRVRV/4       \        P
                  ! ^<4      P                  ^^^4      pV P                  P                  V4       VR,          p\        P                  VR&   V! RVRVRV/4       K  	  R# )Tr@  Nr#  r!   rN  r3  r  r  r  r  r9  )
r   r   r  r   r9  rP  r  r  r  r  )r  r  r  r  rN  r#  r!   s   &&     r"   r  (TestNPFunctions.test_np_trapz_x_dx_basic  s    T"6*++V; BHH_56BAACCD"-.AAACCD"-.AACCD"-.		"%%aA.AHHQCAAgJCCD"-.# 7r$   c                2    V P                  \        R 7       R# r  )test_np_trapz_x_dx_exceptionsr^  r  s   &r"   !test_np_trapezoid_x_dx_exceptions1TestNPFunctions.test_np_trapezoid_x_dx_exceptions  s    **2C*Dr$   c                  a a \        R R7      ! V4      oS P                  4        VV 3R lp. R	Op. R
O. RO3 F  pV! W4R34       K  	  \        P                  ! ^<4      P	                  ^^^4      p\        P                  ! ^$4      P	                  ^^^4      pV! W4R34       \        P                  ! ^<4      P	                  ^^^4      p\        P
                  ! . RO4      pV! W4R34       . R	Op\        P
                  ! RR.4      pV! VRV34       \        P                  ! ^<4      P	                  ^^^4      p\        P                  ! ^<4      P	                  ^^^4      pV! VRV34       S P                  4       ;_uu_ 4       p\        P
                  ! ^4      pV! VRR34       RRR4       S P                  R\        XP                  4      4       ^R\        P                  3 FS  pS P                  4       ;_uu_ 4       pS! VRR4       RRR4       S P                  R\        VP                  4      4       KU  	  R#   + '       g   i     L; i  + '       g   i     LN; i)Tr@  c                    < SP                  \        4      ;_uu_ 4       pS! V !   R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; i)Nzunable to broadcastr  )r  rq  r  r  s   & r"   check_not_okCTestNPFunctions.test_np_trapz_x_dx_exceptions.<locals>.check_not_ok  sE    "":..!v / MM/Q[[1AB /.s   AA%	r%  rq  Nzy cannot be 0DFzy cannot be a scalarr  )r  r+  r  r  r  r  r  r	  )r   rF  r   rP  r  r9  r  rD  rB  rE  r  )r  r  r  r#  r!   rN  rq  r  s   f&     @r"   r  -TestNPFunctions.test_np_trapz_x_dx_exceptions
  s   T"6* 	!	C #Y.A!% / IIbM!!!Q*IIbM!!!Q*aC[!IIbM!!!Q*HH\"aC[!XXsCj!ar]#IIbM!!!Q*YYr]""1a+ar]###%%A!T3( & 	&AKK(89E266!A''))Qas# * MM0#akk2BC	 " &% *)s   "H=?I=I	I c                  a a ^dp\         P                  P                  V4      ^d,          p\         P                  P                  V4      ^d,          p\         P                  ! V4      p\         P                  P                  V4      R8  p\         P                  P                  V4      R8  p\         P                  P	                  ^eVR7      p\         P                  P	                  ^eVR7      p^dp	^2p
^p\         P                  P                  WV4      ^d,          p\         P                  P                  WV4      ^d,          p\        p\        RR7      ! V4      oS P                  V! W#R7      S! W#R7      ^
R7       S P                  V! WR7      S! WR7      ^
R7       S P                  V! WxR7      S! WxR7      ^
R7       S P                  V! W&R7      S! W&R7      ^
R7       S P                  V! WSR7      S! WSR7      ^
R7       S P                  V! WVR7      S! WVR7      ^
R7       S P                  V! V4      S! V4      ^
R7       S P                  V! V4      S! V4      ^
R7       VV 3R lpV! W$R7       VV 3R lpVV 3R	 lpVV 3R
 lp\         P                  ! ^4      P                  R4      p\         P                  ! RR..4      pV! V^R7       V! VVR7       V! V^VR7       R# )rf  r)  rH  Tr@  rV   )placesc                    < SP                  \        4      ;_uu_ 4       pS! WR 7       RRR4       XP                  pSP                  \	        V4      R4       R#   + '       g   i     L9; i)rV   Nz)Weights sum to zero, can't be normalized.)rC  ZeroDivisionErrorrE  r~  rB  datarW   rq  errr  r  s   &&  r"   test_weights_zero_sum;TestNPFunctions.test_average.<locals>.test_weights_zero_sumi  sN    ""#455d, 6++CSXHJ 65   
AA*	c                    < SP                  \        4      ;_uu_ 4       pS! WR 7       RRR4       XP                  pSP                  \	        V4      R4       R#   + '       g   i     L9; i)rV   Nz81D weights expected when shapes of a and weights differ.rC  	TypeErrorrE  r~  rB  r  s   &&  r"   test_1D_weights5TestNPFunctions.test_average.<locals>.test_1D_weightss  sN    ""9--d, .++CSX56 .-r  c                    < SP                  \        4      ;_uu_ 4       pS! WVR 7       RRR4       XP                  pSP                  \	        V4      R4       R#   + '       g   i     L9; i)rc  N)Numba does not support average with axis.r  )r  r>   rW   rq  r  r  r  s   &&&  r"   test_1D_weights_axis:TestNPFunctions.test_average.<locals>.test_1D_weights_axis{  sO    ""9--dw7 .++CSXHJ .-s   AA+	c                    < SP                  \        4      ;_uu_ 4       pS! WR 7       RRR4       XP                  pSP                  \	        V4      R4       R#   + '       g   i     L9; i)r=   Nr  r  )r  r>   rq  r  r  r  s   &&  r"   	test_axis/TestNPFunctions.test_average.<locals>.test_axis  sM    ""9--d& .++CSXHJ .-r  r=   rc  Nr6  g      ?g      ?)r   r  ranfr  rT  rR  re  r   assertAlmostEqualrP  r  r3  )r  r   r0   rX   w0a_boolw_boola_intw_intd0rO  d2a_3dw_3dr  r  r  r  r  r  r  s   f                   @r"   test_averageTestNPFunctions.test_average7  s    IINN1#IINN1#XXa[ "S("S( 		!!#A!.		!!#A!. yy~~bB'#-yy~~bB'#-T"6* 	q 3 %a 22 	 	?t 9 %d 8 	 	E
 	u ; %e :2 	 	G 	q 8 %a 7 	 	Dv 8 %f 7 	 	Dv > %f =b 	 	J 	vay%(2>vd|U4[D	J 	a,	6	J	J yy|##G,JJ()* 	$Q 	a( 	T15r$   c           
        \         p\        R R7      ! V4      p\        P                  ! \        P                  4      P
                  p\        P                  ! V.\        P                  R7      p\        P                  ! RR.4      \        P                  ! RR.4      3\        P                  ! RR.4      \        P                  ! RR.4      3\        P                  ! RR.4      \        P                  ! RR.4      3\        P                  ! R.4      \        P                  ! RR.4      3R\        P                  ! \        P                  ^.4      \        P                  ! ^ \        P                  .4      3WD3.pV F&  w  rFV! WF4      pV! WF4      pV P                  Wx4       K(  	  \        P                  ! R	\        P                  .4      p\        P                  ! R	\        P                  .4      pV P                  V! WF4      4       V P                  V! WFR R
7      V! WFR R
7      4       \        P                  ! \        P                  R	.4      pV P                  V! WF4      V! WF4      4       . ROp	\        P                  ! R4      p
\        P                  P                  R4      pV	 EF  pV	 EF  pV	 EF  pV! WWR7      pV! WWR7      pV P                  Wx4       V! WWR7      pV! WWR7      pV P                  Wx4       V! \        P                  ! V.4      V
WR7      pV! \        P                  ! V.4      V
WR7      pV P                  Wx4       V! WDV,           WR7      pV! WDV,           WR7      pV P                  Wx4       V! WK,           WMVR7      pV! WK,           WMVR7      pV P                  Wx4       EK  	  EK  	  EK  	  R# )Tr@  r7  r,  r.  r-  r)  r/  r0  r%  r   )r   r   N)r%  r%  )r%  r  g{Gz?gMbP?-C6?r(  gư>r'  )r  r  )ra  r   r   r   int_r  r9  r3  r"  r~  r  assertFalser  r  r  )r  r  r  min_intr0   simple_datar1   	py_resultc_resultnoise_levels
zero_arraynoiser   r   s   &             r"   test_allcloseTestNPFunctions.test_allclose  s   T"6*((277#''HHgYbgg. ZZt%rzz:t2D'EFZZt%rzz:t2D'EFZZt%rzz9d2C'DEZZY,=!>?XXrvvqk"BHHa[$9:F
  DAqIQ{HY1  
 JJRVV}%JJRVV}%q%5qt4	6 JJ}%uQ{3EXXg&
IINN7#!E$(D &z,0!=I$Z*. ;H$$Y9 &u,0!=I$U*. ;H$$Y9 &rzz5'':J,0!=I$RZZ%8**. ;H$$Y9 &qe)$ JI$QE	HH$$Y9 &qy!T JI$QY4HH$$Y93 ) % "r$   c                   \         p\        R R7      ! V4      p\        P                  ! RR.4      p\        P                  ! ^}4      P                  \        P                  R7      P                  R
4      pRpRp\        P                  ! ^^ .4      \        P                  ! ^^ .4      3\        P                  ! V.4      \        P                  ! R.4      3\        P                  ! R.4      \        P                  ! ^V,           V,           .4      3W3W6,          ,           3W3W6,          ,           V^,          ,           3WDWF,          ,           3\        P                  \        P                  3\        P                  \        P                  ! \        P                  .4      3.pV F#  w  rV P                  V! W4      V! W4      4       K%  	  R	# )Tr@  g      Y@     @@r7  r)  r(  r'  r%  Nr+  r+  r+  )ra  r   r   r9  rP  rJ  r7  r  r3  r"  r~  )
r  r  r  r@   r6  r   r   
numpy_datar!   r#  s
   &         r"   test_ip_allclose_numpy&TestNPFunctions.test_ip_allclose_numpy  sM   T"6*hhv'yy~$$2::$6>>yI ZZAQF!34ZZSE!23ZZ

AHtO+< =>
"#
"TAX-.$+%&VVRVVVVRZZ)*	

 !FQVA\5;7 !r$   c                \   \         p\        R R7      ! V4      p\        P                  ! ^}4      P	                  \        P
                  R7      P                  R4      pRpRp\        P                  ! \        P                  ^ .4      \        P                  ! R\        P                  .4      3\        P                  ! \        P                  ^ .4      \        P                  ! R^ .4      3\        P                  ! \        P                  \        P                  .4      \        P                  ! R\        P                  .4      3\        P                  ! \        P                  \        P                  .4      \        P                  ! RR.4      3\        P                  ! \        P                  ) R.4      \        P                  ! \        P                  R.4      3\        P                  ! \        P                  R.4      \        P                  ! \        P                  R.4      3\        P                  ! V^,          .4      \        P                  ! R.4      3\        P                  ! R.4      \        P                  ! ^V,           V^,          ,           .4      3W3W4,          ,           V^,          ,           3\        P                  ! \        P                  R.4      \        P                  ! R\        P                  .4      3.
pV F#  w  rxV P                  V! Wx4      V! Wx4      4       K%  	  R# )	Tr@  r7  r)  r(  r%  r'  Nr  )ra  r   r   rP  rJ  r7  r  r3  r"  r  r9  r~  )	r  r  r  r6  r   r   r  r!   r#  s	   &        r"   test_ip_not_allclose_numpy*TestNPFunctions.test_ip_not_allclose_numpy  s	    T"6*yy~$$2::$6>>yI ZZ$bjj#rvv&?@ZZ$bjj#q&:;ZZ()2::sBFFm+DEZZ()2::sCj+ABZZ"&&#'RVVSM)BCZZ&

BFFC=(ABZZ
#RZZ%67ZZ

AHtax,?+@ AB$+%q01XXrvvsm$bhhRVV}&=>

 !FQVA\5;7 !r$   c                    \         p\        R R7      ! V4      p ! R R\        P                  4      pV! ^.4      pV P	                  \        V! WD4      4      \        J 4       R# )Tr@  c                   &   a  ] tR tRt o R tRtV tR# )?TestNPFunctions.test_return_class_is_ndarray_numpy.<locals>.Fooi  c                L    \         P                  ! V/ VB P                  V 4      # r   )r   r9  rS  )clsrn   r  s   &*,r"   __new__GTestNPFunctions.test_return_class_is_ndarray_numpy.<locals>.Foo.__new__  s!    xx0055c::r$   r  N)__name__
__module____qualname____firstlineno__r  __static_attributes____classdictcell____classdict__s   @r"   Foor    s     ; ;r$   r"  N)ra  r   r   ndarrayr:  rp  r  )r  r  r  r"  r0   s   &    r"   "test_return_class_is_ndarray_numpy2TestNPFunctions.test_return_class_is_ndarray_numpy
  sO     T"6*	;"** 	; HU1[)T12r$   c           	         \         p\        R R7      ! V4      p\        P                  ! R\        P                  .4      pV P                  V! W3R R7      V! W3R R7      4       R# )Tr@  r%  r  N)ra  r   r   r9  r  r~  )r  r  r  r!   s   &   r"   test_equalnan_numpy#TestNPFunctions.test_equalnan_numpy  sM    T"6*HHc266]#5qt4	6r$   c                   \         p\        R R7      ! V4      p\        P                  ! \        P                  ^.4      p\        P                  ! ^ \        P                  .4      pV! W44       \        P
                  P                  V\        P                  ! \        P                  ^.4      4       \        P
                  P                  V\        P                  ! ^ \        P                  .4      4       R# r  )ra  r   r   r9  r"  rM  rN  )r  r  r  r!   r#  s   &    r"   $test_no_parameter_modification_numpy4TestNPFunctions.test_no_parameter_modification_numpy!  s     T"6*HHbffa[!HHa[!a


%%a2661+)>?


%%a1bff+)>?r$   c                   \         p\        R R7      ! V4      p\        P                  ! \        P                  4      P
                  p\        P                  ! V.\        P                  R7      pV P                  V! WD4      V! WD4      4       R# Tr@  r7  N)ra  r   r   r   r  r  r9  r~  )r  r  r  r  r0   s   &    r"   test_min_int_numpy"TestNPFunctions.test_min_int_numpy.  s^     T"6*((277#''HHgYbgg.uQ{3r$   c                   V P                  4        \        p\        R R7      ! V4      p\        P                  ! RR\        P
                  .4      \        P                  ! RR.4      RRRR\        3R	^RRRR
\        3^R	RRRR\        3^^RRRR\        3^^RRRR\        3^^RR^R\        3.pV F4  w  rErgrp
V P                  W4      ;_uu_ 4        V! WEWgV4       RRR4       K6  	  R#   + '       g   i     KK  ; ir>  )	rF  ra  r   r   r3  r  r  r   r?  r@  s   &          r"   test_allclose_exception'TestNPFunctions.test_allclose_exception9  s!   !T"6* ZZtRVV,-ZZD)*E5L	
 au8 u9 5%A 5%B 5%?%
. :>5A$i#''55aD	2 65 :>555s   C**C;c                @   \         p\        R R7      ! V4      p\        V P                  WRR7      p\        P
                  ! R^^4      p\        P                  ! R^4      pVR,           pV! RVRVRV/R7       V P                  P                  V4       V! RVRVRV/R7       V P                  P                  V4       V! RVRVRV/R7       \        P                  VR	&   \        P                  VRR
% V P                  P                  V4       V! RVRVRV/R7       \        P                  VR	&   \        P                  ) VRR
% V P                  P                  V4       V! RVRVRV/R7       \        P                  ! R^4      pV^,           pV^,           pV! RVRVRV/R7       RpRpRpV! RVRVRV/R7       Rp\        P
                  ! R^^
4      p\        P                  ! R^4      pV! RVRVRV/R7       \        P                  ! R\        P                  \        P                  \        P                  ) RR .4      pVP                  ^^RR7      p\        P
                  ! R^^
4      p\        P                  ! R^4      pV! RVRVRV/R7       \        R!^4       F  p. R"OpR#pV! RVRVRV/R7       K  	  \        P                  ! . 4      p. R"OpR#pV! RVRVRV/R7       \        P
                  ! ^ ^^<4      P                  ^^^4      p\        P                  ! ^4      pV^
,
          pV! RVRVRV/R7       \        P                  p\        P                  ! ^4      p\        P                  ! ^\        P                  4      pV! RVRVRV/R7       \        P                  p^.p^.pV! RVRVRV/R7       \        P                  ! R^4      pTpTpV! RVRVRV/R7       R R.p\        P                  ! R^4      pTpV! RVRVRV/R7       \        P                  ) R$RR\        P                  .p\        P                  ! R^4      pVR,          pV! RVRVRV/R7       \        P
                  ! R%^
^
4      p\        P                  ! \        P                  ) R$RR\        P                  .4      pVR,          pV! RVRVRV/R7       V P                  P                  ^d4      p\        P
                  ! R&^^d4      p\        P                  ! ^dRR7      pV! RVRVRV/R7       R' F9  p\        P                  ! . RO4      V,          p^^.p^^.pV! RVRVRV/R7       K;  	  ^p^.pR .pV! RVRVRV/R7       \        P
                  ! ^ ^^4      p\        P
                  ! ^ ^^4      p\        P
                  ! ^ ^^24      p	V! WV4      p
\        P                   P#                  W4       \        P                  ! . R(O4      p\        P                  ! . R(O4      p\        P                  ! . R)O4      pV! RVRVRV/R7       ^.p\        P                  .pV! R^RVRV/R7       \        P                  ! . R*O4      p\        P                  ! . R(O4      p\        P                  ! ^^\        P                  ^.4      pV! RVRVRV/4       \        P                  ! . R+O4      p\        P                  ! . R,O4      p\        P                  ! \        P                  ^\        P                  ^\        P                  .4      pV! RVRVRV/4       \        P                  ! . R*O4      p\        P                  ! . R(O4      p\        P                  ! ^^\        P                  ^.4      pV! RVRVRV/4       \        P                  ! ^R\        P                  R\        P                  ) ^R^\        P                  ^ ^.4      p\        P                  ! . R-O4      p\        P                  ! ^^\        P                  ^^\        P                  .4      pV! RVRVRV/4       \        P                  ! . R.O4      p\        P
                  ! ^ ^
R/4      p\        P$                  ! VR,          4      pV! RVRVRV/4       V P                  P'                  ^ ^\        P(                  ,          R04      p\        P
                  ! ^ ^\        P(                  ,          R4      p\        P*                  ! V4      p\        P*                  ! V4      pV! WEV4      p\        P                   P-                  WRR7       V P                  P                  ^
4      p\        P
                  ! R%^
R4      p\        P.                  ! V4      pV! RVRVRV/4       V P                  P                  R4      p\        P
                  ! R%^
^
4      p\        P.                  ! V4      pV! RVRVRV/4       R
# )1Tr@  r2  r  r  r!   rh  ri  )r  :Nr+  NNr  gffffff?r'  rf  rg  Fr%  r
  r        @r  rq  r*  r(  )r   r,  r  r  r  g      r  r  r  r  )r5  )r  ?r~  g333333"r  r  r  r&  r5  r  r  r  r  )r  r  gGz@r  )r  r  r4  r  r  )	r  r  r  r4  r  r  r  r+  g      @r  r  r  r  r  r+  r  )g~@g<ԛ@g3@i!N  )rf  )rg  r   r   r  r   r  rP  r  r  r  r"  r9  r  r  r  r  rM  r  sinuniformr  cosr  	ones_like)r  r  r  r  r!   rh  ri  factorr#  x0r   exactr  s   &            r"   test_interp_basic!TestNPFunctions.test_interp_basicZ  s   T"6*++VEJKKAr"YYr1#XsAtRr23sAtRr23sAtRr23""#sAtRr23266'23sAtRr23IIb!UUsAtRr23sAtRr23/[[Q#YYr1sAtRr23HHc266266BFF7C>?IIa#I&[[Q#YYr1sAtRr23r1ABB34T267 
 HHRLsAtRr23KK2r"**1a3YYr]"WsAtRr23FFYYq\WWQsAtRr23FFSSsAtRr23IIb!sAtRr235MYYr1sAtRr23ffWdCbff-YYr1#XsAtRr23KKR$XXwc378#XsAtRr23HHNN3[[Q$WWSU+sAtRr23F#f,AQBQB34T267	  SVsAtRr23KK1a KK1a [[Ar"B1o


&&s/HH\"XXl#XXo&sAtRr23SffXsAtRr23HH&'XXl#XXq!RVVQ'(Qb$+,HH89XXo&XXrvvq"&&!RVV45Qb$+,HH&'XXl#XXq!RVVQ'(Qb$+,HHabffcBFF7AsArvvq!LMXX()XXq!RVVQ26623Qb$+,HH89[[B	*VVBHQb$+,HHQBEE	62[[AIt,VVBZq	A2


""5D"9 HHNN2[[b$'\\"Qb$+, HHNN4 [[b"%\\"Qb$+,r$   c           	     &   VP                   ^d,          p\        P                  ! WP                  P	                  \        VP                   4      VRR7      \        P                  4       \        P                  ! WP                  P	                  \        VP                   4      VRR7      \        P                  ) 4       \        P                  ! WP                  P	                  \        VP                   4      VRR7      \        P                  4       R# )rf  F)replaceN)rO  r   putr  r  r  r  r"  )r  r0   r  s   && r"   _make_some_values_non_finite,TestNPFunctions._make_some_values_non_finite  s    FFcM
q((//%-E/BBFFK
q((//%-E/BRVVGL
q((//%-E/BBFFKr$   c           	   #    "   \         P                  ! R R^V^,          ,           4      x  \         P                  ! R R^V,           4      x  \         P                  ! RR^V^,          ,           4      x  \         P                  ! RR^V^,          ,           4      x  \         P                  ! RR^V^,          ,           4      x  \         P                  ! RR^V,           4      R	,          x  \         P                  ! RR
^V^,          ,           4      R	,          x  \         P                  ! RR^V,           4      R,          x  \         P                  ! RR
^V^,          ,           4      R,          x  \         P                  ! RR^V^,          ,           4      R\         P                  ! \         P                  ! ^V^,          ,           4      \         P                  ,          ^V^,          ,           ,          4      ,          ,           x  \         P                  ! RR^V,           4      V P
                  P                  ^V,           RV,          R7      ,           x  \         P                  ! RR^V,           4      V P
                  P                  ^V,           R V,          R7      ,           x  \         P                  ! RR^V,           4      V P
                  P                  ^V,           RV,          R7      ,           x  \         P                  ! RR^V,           4      V P
                  P                  ^V,           RV,          R7      ,           x  \         P                  ! RR^V,           4      V P
                  P                  ^V,           RV,          R7      ,           x  \         P                  ! RR^V,           4      V P
                  P                  ^V,           RV,          R7      ,           x  V P
                  P                  ^V,           4      R,          R,           x  V P
                  P                  ^V^,          ,           4      R,          R,           x  R# 5i)rq        @r5  g333333@g      @r3  r  g@g333333@gq=
ףp?g @gQ?r  r)  )rO  scale      @g      4@g      I@g      i@r  g333333?r~  r7  N)r   r  r:  rP  r  r  normalrR  )r  ndatas   &&r"   r  TestNPFunctions.arrays  s6    kk#sA	M22kk#sAI..kk#sA
N33kk#sA
N33kk#sA
N33kk#sAI.55kk#sA
N3d::kk#sAI.55kk#sA
N3d::kk#sA
N3cBFFIIa%!)m$ruu,EAI>=@ 7@ @ 	@ kk#sAI.U#+ 2A 2/ / 	/ kk#sAI.U#+ 2A 2/ / 	/ kk#sAI.U#+ 2A 2/ / 	/ kk#sAI.U$, 2A 20 0 	0 kk#sAI.U$, 2A 20 0 	0 kk#sAI.U%%- 2A 21 1 	1 hhmmAI&,s22hhmmA	M*S0366s   QQc                   \         p\        R R7      ! V4      pRp\        P                  ! ^ ^
^V,           4      p\        P                  ! VR,          4      pV P                  V4       EF  pRpV! WdV4      pV! WdV4      p	V P                  WVR7       V P                  P                  V4       V! WdV4      pV! WdV4      p	V P                  WVR7       V P                  P                  V4       V! WdV4      pV! WdV4      p	V P                  WVR7       V P                  P                  V4       V! WdV4      pV! WdV4      p	V P                  WVR7       V P                  V4       V! WdV4      pV! WdV4      p	V P                  WVR7       V P                  V4       V! WdV4      pV! WdV4      p	V P                  WVR7       V P                  V4       V! WdV4      pV! WdV4      p	V P                  WVR7       EK  	  R# )Tr@  i N  rq  r  r  N)
rg  r   r   r  r:  r  r  r  r  rF  )
r  r  r  rM  rh  ri  r!   r   r  r  s
   &         r"   test_interp_stress_tests(TestNPFunctions.test_interp_stress_tests1  s   T"6*[[BE	*VVBHU#ADaR(Hr"C##H4#@
 HHQaR(Hr"C##H4#@HHR aR(Hr"C##H4#@HHR aR(Hr"C##H4#@ --a0aR(Hr"C##H4#@--b1aR(Hr"C##H4#@--b1aR(Hr"C##H4#@O $r$   zNEP 50 interaction issue.c                &   \         p\        R R7      ! V4      pRp\        P                  ! ^ ^
^V,           4      p\        P                  ! VR,          4      pV P
                  P                  \        P                  \        P                  ) \        P                  .^4      VR&   V P
                  P                  V4       \        P                  ! VR,          4      pV P
                  P                  \        P                  \        P                  ) \        P                  .^4      VR&   V P
                  P                  V4       VRV,          ,           pV P                  V4       F  pV! WV4      p	V! WV4      p
\        P                  P                  WR R7       V P
                  P                  V4       V P
                  P                  V4       V P
                  P                  V4       \        P                  P                  WR R7       K  	  R# )Tr@  i  rq  :N   Nr0  r  N)rg  r   r   r  r:  r  r  r"  r  r  r<  r  rM  r  )r  r  r  rM  rh  rO  rM  ri  r!   r  r  s   &          r"    test_interp_complex_stress_tests0TestNPFunctions.test_interp_complex_stress_testsb  sp   T"6*[[BE	*vvb3hXX__bffrvvgrvv%>DT
vvb3hXX__bffrvvgrvv%>DT
BIU#AaR(Hr"CJJ&&x&EHHQHHR HHR JJ&&x&E $r$   c                   \         p\        R R7      ! V4      pV P                  4        \        P                  ! . R	O4      p\        P                  ! . 4      p\        P                  ! . 4      pV P                  \        4      ;_uu_ 4       pV! W4V4       RRR4       RpV P                  V\        XP                  4      4       ^p\        P                  ! . R	O4      p\        P                  ! ^^.4      pV P                  \        4      ;_uu_ 4       pV! W4V4       RRR4       RpV P                  V\        VP                  4      4       ^p\        P                  ! ^4      P                  ^^4      p\        P                  ! ^4      pV P                  4       ;_uu_ 4       pV! W4V4       RRR4       RpV P                  V\        VP                  4      4       ^p\        P                  ! ^4      p\        P                  ! ^4      P                  ^^4      pV P                  4       ;_uu_ 4       pV! W4V4       RRR4       RpV P                  V\        VP                  4      4       R
p\        P                  ! ^4      p\        P                  ! ^4      pV P                  4       ;_uu_ 4       pV! W4V4       RRR4       RpV P                  V\        VP                  4      4       ^p\        P                  ! ^4      R,           P                  \        P                  4      p\        P                  ! ^4      pV P                  4       ;_uu_ 4       pV! W4V4       RRR4       V P                  V\        VP                  4      4       R#   + '       g   i     EL ; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL+; i  + '       g   i     L; i)Tr@  Nzarray of sample points is emptyz#fp and xp are not of the same size.zxp must be 1Dzfp must be 1Dr0  z:Cannot cast array data from complex dtype to float64 dtyper  r  )rg  r   rF  r   r9  rC  r  rD  rB  rE  rP  r  r  rJ  r  )	r  r  r  r!   rh  ri  rq  r  complex_dtype_msgs	   &        r"   test_interp_exceptions&TestNPFunctions.test_interp_exceptions~  s   T"6* 	!HHYXXb\XXb\z**a! + 0c3q{{+,XXi XXq!fz**a! + 4c3q{{+,YYq\!!!Q'YYq\##%%! & c3q{{+,YYq\YYq\!!!Q'##%%! & c3q{{+,YYq\YYq\##%%! & 	 	'Q[[)9:iilR''5YYq\##%%! & 	'Q[[)9:q +** +** &%% &%% &%% &%sH   

N
N!
N30
O/
O
O/N	N0	3O	O	O,	/O?	c                >   \         p\        R R7      ! V4      p\        V P                  W4      p\        P
                  ! . R
O4      p\        P
                  ! \        P                  ) RR\        P                  .4      p\        P
                  ! RR.4      pRVRVRV/pV! V4       \        P
                  ! \        P                  ) ^^	\        P                  .4      p\        P
                  ! . RO4      p\        P
                  ! RR.4      pRVRVRV/pV! V4       R	# )Tr@  r  ?r  r  r!   rh  ri  N)r   r  r  rN  )r   r  r[  r  )rg  r   r   r  r   r9  r"  )r  r  r  r  rh  ri  r!   r  s   &       r"   "test_interp_non_finite_calibration2TestNPFunctions.test_interp_non_finite_calibration  s     T"6*++V;XXm$XXwS"&&12HHc3Z q$D"-vXXw1bff-.XX&'HHc3Z q$D"-vr$   c                l   \         p\        R R7      ! V4      p\        ^^
4       EF  p\        P                  ! V\        P
                  R7      p\        P                  ! V\        P
                  R7      p\        P                  ! R^ V^,
          V.\        P
                  R7      pVRRR1,          pV! WdV4      pV! WtV4      p	\        P                  ! . RO\        R7      p
V
RRR1,          p\        P                  P                  W4       \        P                  P                  W4       EK
  	  \        P                  ! ^ ^^4      p\        P                  ! ^ ^^4      p^ p\        P                  P                  V! WV4      V4       Rp\        P                  P                  V! WV4      V4       \        P                  ! R4      p\        P                  P                  V! WV4      V4       \        P                  ! R4      p\        P                  P                  V! WV4      V4       \        P                  p\        P                  P                  V! WV4      V4       \        P                  ! ^ ^^4      p\        P                  ! ^ ^^4      p\        P                  ! R4      p\        P                  P                  V! WV4      V4       \        P                  ! ^ ^
R4      p\        P                  ! V4      p\        P                  P                  V! \        P                   WO4      R4       R# )	Tr@  r7  Nr  r  r'  r  r  )rg  r   r  r   rP  r  r  r9  rz  rM  r  r  r
  r7  r  r:  r  )r  r  r  rO  rh  ypincptsdecptsincresdecresinctgtdectgtr!   r#  r?  ri  s   &               r"   test_interp_supplemental_tests.TestNPFunctions.test_interp_supplemental_tests  s5    T"6*!RLD4ryy1BRYY/BXXr1dQh5RYYGFDbD\F6r*F6r*FXXl%8FDbD\FJJ**6:JJ**6: ! KK1a KK1a 


&&uRA;


&&uRA;ZZ_


&&uRA;ZZ_


&&uRA;VV


&&uRA;KK1a KK1a XXc]


&&uRA;YYq"f%VVBZ


&&uRUUB';SAr$   c                l   \         p\        R R7      ! V4      p\        P                  ! ^ ^^4      p\        P                  ! ^ ^^4      ^\        P                  ! ^ ^^4      ,           R,          ,           pRpV^V,           R,          ,           p\        P                  P                  V! WSV4      V4       R# )Tr@  r0  r  N)rg  r   r   r  rM  r  )r  r  r  r!   r#  r?  y0s   &      r"   &test_interp_supplemental_complex_tests6TestNPFunctions.test_interp_supplemental_complex_tests  s     T"6*KK1a KK1a AAq!(<$<#DD1r6T/!


&&uRA;r$   c                   \         p\        R R7      ! V4      p\        P                  \        P                  \        P
                  \        P                  .p\        P                  ! V^4       Fu  pVw  rVp\        P                  ! ^
VR7      pV^,          P                  V4      p	\        P                  ! ^^^
VR7      p
V! WV	4      pV! WV	4      pV P                  W4       Kw  	  R# r-  )rg  r   r   r
  r7  r  r  r  r  rP  rJ  r  r  )r  r  r  dtypescomboxp_dtypefp_dtypex_dtyperh  ri  r!   r  r  s   &            r"   -test_interp_float_precision_handled_per_numpy=TestNPFunctions.test_interp_float_precision_handled_per_numpy  s    T"6***bjj"((BHH=<<VQGE*/'H2X.B'!!(+BAq"G4AaR(Hr"C##H2 Hr$   c                   R  p\         p\        RR7      ! V4      pV! 4        FZ  pV! V4      pV! V4      p\        V\        P                  4      '       d   V P                  WVV34       KH  V P                  WVV4       K\  	  R# )c               3     "   \         P                  ! R 4      x  \         P                  ! R4      x  \         P                  ! RR4      x  \         P                  ! RR4      x  \         P                  ! R4      x  \         P                  ! RR4      x  \         P                  ! ^"R4      x  R	 FI  p \         P                  ! . R
ORV ,          R7      x  \         P                  ! . R
ORV ,          R7      x  KK  	  R# 5i)z
2016-01-01NaTmsnsz2038-01-19T03:14:07z<datetime64[%s]r7  z<timedelta64[%s]N)r  r   WDhr   rM  rw  usrx  psfsas){   irv  )r   r  r  r9  )units    r"   rA   *TestNPFunctions.test_isnat.<locals>.values  s     ------&&--t,,--t,,-- 566..--..T**1 hh1%6%=? ?hh1%7$%>@ @1s   C>D Tr@  N)r   r   r  r   r#  r  r~  r  s   &      r"   
test_isnatTestNPFunctions.test_isnat  so    	@$ T"6*AayH(C!RZZ((''t<  2 r$   c                V  a  R  pV 3R lp\         \        3 EF  p\        RR7      ! V4      p\        S P                  W44      pV! 4        F  pRV/pRVP
                  9   d'   R\        P                  3 F  pWR&   V! V4       K  	  MV! V4       \        P                  ! ^
\        P                  R7      pRV/pRVP
                  9   dL   RVR&   V! VRV4       \        P                  VR&   V! VR	V4       \        P                  VR&   V! VRV4       K  V! VRV4       K  	  EK  	  R# )
c               3    "   Rx  Rx  Rx  ^x  . ROx  RR.x  Rx  Rx  . RO. RO3x  \         P                  ! . 4      x  \         P                  ! ^4      x  \         P                  ! ^4      P                  ^^4      x  \         P                  ! ^4      P                  ^^4      P                  x  R p V ! R4      x  V ! R4      x  V ! R	4      x  V ! R
4      x  R# 5i)a  
To quote from: https://docs.scipy.org/doc/numpy/reference/generated/numpy.asarray.html    # noqa: E501
Input data, in any form that can be converted to an array.
This includes:
* lists
* lists of tuples
* tuples
* tuples of tuples
* tuples of lists
* ndarrays
r0  r  Fc                 N    \        4       pV  F  pVP                  V4       K  	  V# r   r
   r?   )rA   r0   r  s   &  r"   	make_listITestNPFunctions.test_asarray.<locals>.input_variations.<locals>.make_listV  s#    FAHHQK  r$   Nr  r  )r%  rq  r  r  r  )r   r9  rP  r  r]  )r  s    r"   r  6TestNPFunctions.test_asarray.<locals>.input_variations;  s      HIKGOi((O((i((((2,))A,))B-''1--))B-''1-///
 I&&O,,L))/00s   C&C(c                 &  < V ! R/ VB pV'       d   SP                  W2R ,          J 4       R# SP                  W2R ,          J4       \        P                  P                  W2R ,          4       SP                  VP                  VR,          8H  4       R# )r0   r8  Nr  )r:  r   rM  r  r8  )jittedexpect_samer  returnedr  s   &&& r"   check_pass_through8TestNPFunctions.test_asarray.<locals>.check_pass_throughc  sh    ''H3K 78s ;<

**8C[A&/ ABr$   Tr@  r0   kwsNr8  r7  F)
r3  r:  r   r   r  r  r   r:  rP  r
  )	r  r  r  r  r  r  r!   r  rL  s	   f        r"   test_asarrayTestNPFunctions.test_asarray9  s   #	1P	C ,F&v.ET//?F%'qFOO+#R]]3*,wv 4 6N IIb

3qFOO+&*F7O&udF;&(mmF7O&ueV<&(jjF7O&udF;&udF;) (	 -r$   c                    R  pR pR pR pWW4.pV F4  p\        RR7      ! V4      pV! 4       pV! 4       p	V P                  W4       K6  	  R# )c                  .    \         P                  ! R 4      # r  r2  r  r$   r"   case13TestNPFunctions.test_asarray_literal.<locals>.case1  s    ::m,,r$   c                  2    R p \         P                  ! V 4      # r  r2  rM  s    r"   case23TestNPFunctions.test_asarray_literal.<locals>.case2  s    A::a= r$   c                  2    R p \         P                  ! V 4      # )u+   大处 着眼，小处着手。大大大处r2  r  s    r"   case33TestNPFunctions.test_asarray_literal.<locals>.case3  s    =A::a= r$   c                  2    R p \         P                  ! V 4      # ) r2  r  s    r"   case43TestNPFunctions.test_asarray_literal.<locals>.case4  s    A::a= r$   Tr@  N)r   r  )
r  r  r  r  r  funcsr  r  r  r  s
   &         r"   test_asarray_literal$TestNPFunctions.test_asarray_literal  sW    	-	!	!	! u,F&v.ExH'C##H2	 r$   c                   a a S P                  4        \        R R7      ! \        4      oVV 3R lpR pR pR pR pV! V! 4       4       V! V! 4       4       V! V! 4       4       V! V! 4       4       R# )Tr@  c                    < SP                  \        4      ;_uu_ 4       pS! V 4       R R R 4       SP                  R\        XP                  4      4       R #   + '       g   i     L7; i)Nz?asarray support for List is limited to Boolean and Number types)rC  r   rD  rB  rE  )alistrq  r  r  s   & r"   test_rejectQTestNPFunctions.test_asarray_rejects_List_with_illegal_dtype.<locals>.test_reject  sH    "";//1e 0MM.AKK " 0/r  c                  <    \        4       p V P                  R 4       V # r   r  )ls    r"   make_none_typed_listZTestNPFunctions.test_asarray_rejects_List_with_illegal_dtype.<locals>.make_none_typed_list  s    AHHTNHr$   c                  r    \        4       p \        4       pVP                  ^4       V P                  V4       V # rh  r  )r  r   s     r"   make_nested_listVTestNPFunctions.test_asarray_rejects_List_with_illegal_dtype.<locals>.make_nested_list  s+    AAHHQKHHQKHr$   c                  Z    \        4       p \        4       pR V^&   V P                  V4       V # rJ   )r
   r   r?   )r  r  s     r"   make_nested_list_with_dict`TestNPFunctions.test_asarray_rejects_List_with_illegal_dtype.<locals>.make_nested_list_with_dict  s)    AAAaDHHQKHr$   c                  N    \        4       p R F  pV P                  V4       K  	  V # )r0   )r0   bcdefr  )r  r  s     r"   make_unicode_listWTestNPFunctions.test_asarray_rejects_List_with_illegal_dtype.<locals>.make_unicode_list  s#    A' (Hr$   N)rF  r   r3  )r  r  r  r  r  r  r  s   f     @r"   ,test_asarray_rejects_List_with_illegal_dtype<TestNPFunctions.test_asarray_rejects_List_with_illegal_dtype  si    !T"7+	"	
			 	(*+$&'.01%'(r$   c                   R  p\         p\        RR7      ! V4      pV! 4        F  w  rEVf   V! V4      pV! V4      pMV! WER7      pV! WER7      pV P                  Wg4       V P                  \        P
                  ! VP                  \        P                  4      VP                  4       K  	  \        p\        RR7      ! V4      p\        P                  ! . RO4      pV! V4      pV! V4      pV P                  Wg4       V P                  \        P
                  ! VP                  \        P                  4      VP                  4       R# )c               3     "   \         P                  ! . RO4      R3x  \         P                  ! ^^.\         P                  R7      \         P                  3x  \         P                  ! ^^.\         P                  R7      \         P                  3x  \         P                  ! ^^.\         P                  R7      \         P                  3x  \         P                  ! ^^.\         P                  R7      \         P
                  3x  R# 5i)r  Nr7  r  )r   r9  r
  rK  r  r:  r  r$   r"   r  -TestNPFunctions.test_asfarray.<locals>.inputs  s     ((9%t++((Aq64bjj@@((Aq61277::((Aq612<<??((Aq612==@@s   DD	Tr@  Nr7  r  )
r=  r   r  r:  r   r  r8  inexactr?  r9  )r  r  r  r  r@   rL  r  r  s   &       r"   test_asfarrayTestNPFunctions.test_asfarray  s    	A T"6*xGCz!#;Cj!#0C*##H2OOBMM#))RZZ@#))L   (T"6*hhy!#;Cj.cii<ciiHr$   c           	     2  a aa \         p\        V4      p\        p\        V4      pW3W433 EF  w  ooVVV 3R  lp\        '       dg   \        P
                  ! ^4      \        P                  ! ^
4      \        P                  ! . 4      .p\        P                  \        P                  .p. R	OpM\        P
                  ! ^4      \        P                  ! R4      \        P                  ! ^ ^.^^..4      \        P                  ! . 4      \        P                  ! . . .4      .p\        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  .p. R
OpR \         P"                  ! VV4       4       p	\        '       d   ^. R	O.p
M
^RRR. R	OR	.p
\         P$                  ! V	V
4       F  pV F  pV! WR7       K  	  K  	  \        P                  ! ^4      p^ .^.^.3 F*  pV! WR7       V! V\        P                  ! V4      R7       K,  	  \        P                  ! ^4      p^ ^ .^ ^.^^ .^ ^.^^.^^.^^.3 F*  pV! WR7       V! V\        P                  ! V4      R7       K,  	  V! V\        P                  ! ^^.\        P                  R7      R7       V! \        P                  ! ^
4      \        P                  ! ^
4      R7       EK  	  R# )c                 D   < SP                  S! W4      S! W4      4       R # r   ri  )r0   rm  nbfuncr  r  s   &&r"   r"  *TestNPFunctions.test_repeat.<locals>.check  s    ''q(:F1<NOr$   r*  c              3   T   "   T F  w  r\         P                  ! WR 7      x  K   	  R# 5i)r7  Nr  ).0r0   ts   &  r"   	<genexpr>.TestNPFunctions.test_repeat.<locals>.<genexpr>  s,      #J$I <?1288A#6#6$Is   &(r%  Tr0  )rm  r7  Nr  )r   r  r  r  rf  )rn  r   rp  r   r   r  rP  r9  r7  r:  uint32r  uint64r  r
  r  r  r   r)  )r  r  r  array_pyfuncarray_nbfuncr"  target_numpy_valuestarget_numpy_typesrepeats_valuestarget_numpy_inputstarget_non_numpy_inputsr  rm  onetwor  r  s   f              @@r"   test_repeatTestNPFunctions.test_repeat  s   	O	 $L) )5 ,;=NFFP  GGAJIIbMHHRL'# JJMM&" "+ GGAJIIdOHHq!fq!f-.HHRLHHb"X&'# IIHHIIHHJJJJLLMM	&" "3#J#,#4#45H5G$I#J +' +' __%8%<>-G!-  .> ))A,CcA3_c%c288A;/ % ))A,C!fq!fq!fq!fq!fq!fq!fMc%c288A;/ N #rxxAbhh?@"))B-277Y=r$   c           
        \         p\        V4      p\        p\        V4      pV P                  4        W3W433 EF  w  rVV P	                  \
        4      ;_uu_ 4       pV! \        P                  ! ^4      R4       RRR4       V P                  R\        XP                  4      4       V P	                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      R4       RRR4       V P                  R\        VP                  4      4       V P	                  \
        4      ;_uu_ 4       pV! \        P                  ! ^4      \        P                  ! ^R.4      4       RRR4       V P                  R\        VP                  4      4       V P	                  \
        4      ;_uu_ 4       pV! \        P                  ! ^4      \        P                  ! . RO4      4       RRR4       V P                  R\        VP                  4      4       V P	                  \
        4      ;_uu_ 4       pV! \        P                  ! ^4      \        P                  ! . RO4      4       RRR4       V P                  R\        VP                  4      4       V P	                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      RR.4       RRR4       V P                  R\        VP                  4      4       R	 FF  pV P	                  \        4      ;_uu_ 4        V! \        P                  ! ^4      V4       RRR4       KH  	  EK	  	  R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELC; i  + '       g   i     L; i  + '       g   i     K  ; i)
r  Nz#negative dimensions are not allowedr%  zIThe repeats argument must be an integer or an array-like of integer dtypez(operands could not be broadcast togetherr  r9  r  )Tr0   r  )rn  r   rp  rF  rC  r  r   r  rD  rB  rE  r   r9  )	r  r  r  r  r  r  r  rq  reps	   &        r"   test_repeat_exception%TestNPFunctions.test_repeat_exceptionA  s   	O	 $L)! )5 ,;=NF "":..!rwwqz2& /MM?akk*, "";//1rwwqz3' 0MM4AKK " "":..!rwwqz288QG#45 /MM?akk*, "":..!rwwqz288I#67 /MMDakk*, "":..!rwwqz288L#9: /MMDakk*, "";//1rwwqzC:. 0MM4AKK "
 (&&{332771:s+ 43 (W= /.. 0// /.. /.. /.. 0/ 433sT   MM,4M.*4N(4N& N*N=	MM+.M?NN'*N:=Oc                   \         p\        \         4      p\        P                  ! . RO4      \        P                  ! . RO4      \        P                  ! . RO4      .\        P                  ! . RO4      \        P                  ! . RO4      \        P                  ! . R	O4      .R3\        P                  ! R.4      \        P                  ! R .4      .\        P                  ! ^.4      \        P                  ! ^.4      .^ 3\        P                  ! R .4      .^d,          \        P                  ! ^.4      .^d,          ^ 3\        P                  ! \        P                  ! ^^^\        P
                  ^^.4      4      .^,          \        P                  ! ^^^\        P
                  ^^.4      .^,          ^ 3\        P                  ! \        P                  ! ^^^\        P
                  ^^..4      4      .^,          \        P                  ! ^^^\        P
                  ^^..4      .^,          ^ 3\        P                  ! \        P                  ! ^^R
\        P
                  ^^.4      4      .^,          \        P                  ! ^^R
\        P
                  ^^.4      .^,          ^ 3.p\        P                  ! ^
4      \        P                  ! ^
4      P                  R4      3 F  pVP                  V^8  V^8  .WD^,          .^ 34       VP                  V^8  V^8  3WD^,          3^ 34       VP                  V^8  V^8  .WD^,          3^ 34       VP                  V^8  V^8  3WD^,          .^ 34       K  	  V F&  w  rVpV P                  V! WVV4      V! WVV4      4       K(  	  \        p\        \        4      p	V P                  V! XX4      V	! WV4      4       R# )FTg.@NFFFFTF)FFTr  r  r  y      @       @)r+  r  )rw  r   r   r9  rE  r  rP  r  r?   r  ry  )
r  r  r  
test_casesr!   ru  rv  rr  np_pyfunc_defaultsnp_nbfunc_defaultss
   &         r"   test_selectTestNPFunctions.test_select{  s8   	O	 hh,-hh+,hh+,. hhy!hhy!hhy!#$(* hhvhhw!#%88QC="((A3-"@!E hhw 3&1##(=qAhhrxxAq"&&!Q 789:Q>hh1aA./014a9 hhrxx!Q2661a!8 9:;<q@hhAq"&&!Q/012Q6; hhrxxAvrvvq! <=>?!Chh1fbffa34591>/

6 ))B-2!6!6v!>?AAq1u~6{A>?Aq1u~6{A>?Aq1u~6{A>?Aq1u~6{A>? @ /9*H7##IhG$L$-hG$LN /9 0!"45 28Z H 28 H	Jr$   c                   \        \        4      p\        P                  ! ^
4      pV P	                  4        \        P
                  ! R4      \        P
                  ! . RO4      .\        P
                  ! ^4      \        P                  ! ^4      P                  ^^4      .^ \        R3\        P
                  ! R4      \        P
                  ! R4      .\        P
                  ! ^.4      \        P
                  ! ^.4      .^ \        R3\        P
                  ! R.4      \        P
                  ! R.4      .\        P
                  ! ^..4      \        P
                  ! ^..4      .^ \        R3\        P
                  ! R4      \        P
                  ! R4      .\        P
                  ! ^4      \        P
                  ! ^4      .^ \        R3\        P                  ! \        P
                  ! ^^^\        P                  ^^.4      4      \        P
                  ! ^^^\        P                  ^^.4      ^ \        R3R.^ .^ .\        R3V^8  P                  \        4      V^8  P                  \        4      .W"^,          .^ \        R3V^	8  V^8  V^8  V^8  .W"^,          V.^ \        R3R.^d,          \        P
                  ! ^.4      .^d,          ^ \        R	3\        P
                  ! R.4      .^d,          R.^d,          ^ \        R
33
 FW  w  r4rVpV P                  V4      ;_uu_ 4       pV! W4V4       RRR4       V P                  V\        XP                   4      4       KY  	  R#   + '       g   i     L;; i)rN  TFz/condlist arrays must be of at least dimension 1zHcondlist and choicelist elements must have the same number of dimensionsz"condlist must be a List or a Tuplezdefault must be a scalarz%condlist arrays must contain booleansz7list of cases must be same length as list of conditionsz items of condlist must be arraysz"items of choicelist must be arraysNr  rl  rh  )r   rw  r   rP  rF  r9  r  r   rE  r  rJ  r  r  rC  rD  rB  rE  )	r  r  r!   ru  rv  rr  expected_errorexpected_textrq  s	   &        r"   test_select_exception%TestNPFunctions.test_select_exception  s   O	IIbM! hhtnbhh';<=hhqk299R=00A67KM hhtnbhhuo.1#!0N 9: hhv% 12hhuorxx!/K)*
 hhtnbhhuo.!bhhqk0JAKM XXbhh1aA678XXq!Q1-.;13 VaS1#{') 1unnS!AE>>##67!!VaAC !eQUAE1q5)A!tQ<JFH Z#!4a/1 hhw 3&a13Y.M
HH'=^ "">22a(8 3MM-Q[[)9:c.M
^ 32s   &
M##M3c           	     D  a  V 3R  lpV! \         4       V! \        4       V! \        4       V! \        4       \        p\        \        4      pR Fm  pR Fd  pV! WE4      pV! WE4      p\        '       g   \        P                  ! 4       R	9   d   S P                  VVR^R7       KP  S P                  WgR^R7       Kf  	  Ko  	  R
 FW  pS P                  \        4      ;_uu_ 4       pV! VR4       RRR4       S P                  R\        XP                  4      4       KY  	  R FW  pS P                  \        4      ;_uu_ 4       pV! ^V4       RRR4       S P                  R\        XP                  4      4       KY  	  R#   + '       g   i     L; i  + '       g   i     LN; i)c                 X  < T p\        V 4      pR F&  pV! V4      pV! V4      pSP                  WERR7       K(  	  R FV  pSP                  \        4      ;_uu_ 4       pV! R4       RRR4       SP	                  R\        XP                  4      4       KX  	  R#   + '       g   i     L;; i)r   r  )r  r3  NM must be an integerr   r  r+     r0   r3  r0  )r   r  rC  r   rD  rB  rE  )r  r  r  r   r  r  rH  r  s   &      r"   check_window4TestNPFunctions.test_windowing.<locals>.check_window  s    IT
I"$Q<l''H'E #
 $&&{33vcN 44c&:J:J6KL $33s   	BB)r  r  r%  Nr  z beta must be an integer or floatr  )r'  rK  g      ,@)ppc64leaarch64r  )r0   r0  )r}  r  r  r  r  r   r   platformmachiner  rC  r   rD  rB  rE  )	r  r  r  r  r   r  r  r  rH  s	   f        r"   test_windowingTestNPFunctions.test_windowing  sW   	M 	[![!Z Z  	O	A($Q-(9 0 0 26L L++H,/hQ , H ++H12 , 4 )   A"";//6!S! 0MM0#f6F6F2GH  
 D"";//6!T" 0MM<f../1 	 0/
 0/s   "
E<?
F<FFc                   \         p\        R R7      ! V4      p\        P                  ! . RO. RO.4      \        P                  ! . RO. RO.4      3\        P                  ! . RO. RO.4      R3\        P                  ! . RO\        P                  R7      \        P                  ! . RO\        P
                  R7      3R\        P                  ! ^^.4      \        P                  ! . RO4      3\        P                  ! . RO4      \        P                  ! . RO. RO.4      3\        P                  ! . RO. RO.4      \        P                  ! . RO4      3\        P                  ! ^$4      P                  ^^^4      \        P                  ! ^4      P                  ^^4      3.pV F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )Tr@  r7  Nr  r  ry  r  )r  r  )	r  r   r   r9  r  r7  rP  r  r  r  r  r  pairsr!   r#  r  r  s   &       r"   
test_crossTestNPFunctions.test_cross  se   T"6* )Y/0)Y/0 )Y/0  "((3"**5
 !Q # #)Y/0 )Y/0# 		"%%aA.		!$$Q*K)
V DAa|H+C##H2 r$   c           	        \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! \
        P                  ! ^4      \
        P                  ! ^4      4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! R4      \
        P                  ! R	4      4       RRR4       V P                  R\        VP                  4      4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! ^4      P                  R
4      \
        P                  ! ^4      RRR1,          P                  R4      4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! ^4      P                  R4      \
        P                  ! ^4      RRR1,          P                  R4      4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        . RO4      \        . RO4      4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL#; i  + '       g   i     ELn; i  + '       g   i     L; i  + '       g   i     L; i)Tr@  Nz)Incompatible dimensions for cross productz Dimensions for both inputs is 2.z+`cross2d(a, b)` from `numba.np.extensions`.zDimensions for both inputs is 2Inputs must be array-like.r  r  r  r  r  r  )r  r  r  r  )r  r   rF  rC  r  r   rP  rD  rB  rE  r9  r  r   setrG  s   &   r"   test_cross_exceptions%TestNPFunctions.test_cross_exceptionsG  sc   T"6*! z**f		!		! +
 	7  !	
 z**f   +
 	.  !	

 	9  !	
 z**f		!$$V,		!TrT"**62 +
 	7  !	
 z**f		!$$V,		!TrT"**62 +
 	-  !	
 {++vII ,
 	(  !	
m +** +**  +** +* ,+s>   2K:2L#AL"AL6+ M	:L	L	"L3	6M		M	c                8   \         p\        \        4      p\        P                  ! ^^.^^..4      \        P                  ! ^^.^^..4      3\        P                  ! ^^.^^..4      R3\        P                  ! ^^.\        P
                  R7      \        P                  ! ^^.\        P                  R7      3R\        P                  ! ^^.4      \        P                  ! ^^.^^..4      3\        P                  ! ^^.^^..4      \        P                  ! ^^.4      3\        P                  ! ^$4      P                  ^^^4      \        P                  ! ^4      P                  ^^4      3.pV F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )r  r7  Nr  )r  ry  )
r  r   r  r   r9  r  r7  rP  r  r  r  s   &       r"   test_cross2dTestNPFunctions.test_cross2d  su   Z  1a&1a&)*1a&1a&)* 1a&1a&)*  !Qrxx0!Qrzz2
 !Q 1a&1a&)* 1a&1a&)*!Q  		"%%aA.		!$$Q*A$
L DAa|H+C##H2 r$   c           	        \        \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! \
        P                  ! R4      \
        P                  ! R4      4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! ^4      P                  R4      \
        P                  ! ^4      RRR1,          P                  R4      4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        ^^.4      \        ^^.4      4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     ELF; i  + '       g   i     L; i  + '       g   i     L^; i)r  Nz,Incompatible dimensions for 2D cross productr   r  r  r  r  )r   r  rF  rC  r  r   r9  rD  rB  rE  rP  r  r   r  r  s   &  r"   test_cross2d_exceptions'TestNPFunctions.test_cross2d_exceptions  s\   Z ! z**f## +
 	:  !	
 z**f		!$$V,		!TrT"**62 +
 	:  !	
 {++vQFQF ,
 	(  !	
7 +** +* ,+s$   2F,9AG  G,F=	 G	G#	c                   R  pR p\         p\        RR7      ! V4      pV! 4        F$  pV! V4      pV! V4      pV P                  Wg4       K&  	  V! 4        F&  w  rXV! WX4      pV! WX4      pV P                  Wg4       K(  	  R# )c               3     "   \         P                  ! . 4      x  \         P                  ! ^4      x  \         P                  ! ^4      x  \         P                  ! . RO4      x  \         P                  ! . RO4      x  \         P                  ! RRR\         P                  R.4      x  \         P                  ! . RO4      x  R# 5i)r+  r'  r%  rq  Nr  r  )0Helloworld)r   r9  r  r  r  r$   r"   r  /TestNPFunctions.test_trim_zeros.<locals>.arrays  s{     ((2,((1+((1+((9%%((<((((BB344((233r  c               3     "   \         P                  ! . RO4      R3x  \         P                  ! . RO4      R3x  \         P                  ! \         P                  RRRR.4      R3x  \         P                  ! . RO4      R3x  \        R8  d9   \         P                  ! . RO4      R3x  \         P                  ! . RO4      R	3x  \         P                  ! . RO4      R3x  R
# 5i)r   FBBr'  r  r  r1   r  abfr  N)r   r  r  r   r   r  )r   r   r  r  r+  r  )r   r  r  r   )r   r  r   ) r  r  )r   r9  r  r   r  r$   r"   explicit_trim6TestNPFunctions.test_trim_zeros.<locals>.explicit_trim  s     ((?+T11((9%s**((BFFBS"56;;((?+S00v%hh|,e33hhy)3..((+,c11s   C#C%Tr@  N)r  r   r  )	r  r  r  r  r  r@   r  r  r  s	   &        r"   test_trim_zerosTestNPFunctions.test_trim_zeros  s    	4
	2 T"6*8Cc{H*C##H2 
 'ICc(H"C##H2 )r$   c                *   \         P                  ! . R
O4      pVP                  \        4      pVP                  \        4      pWV.p\         P
                  ^R pV F&  p\        V4      pV P                  WvV,          4       K(  	  \         P
                  RR pV F(  p\        VRR7      pV P                  WvV,          4       K*  	  \         P
                  R,          pV F(  p\        VRR7      pV P                  WvV,          4       K*  	  V Fb  p\         P                  ! WP                  R7      p\        VRR7      p	\        V	4      ^ 8X  g   Q h\        VRR7      p
\        V
4      ^ 8X  d   Kb  Q h	  \         P                  ! ^ 4      p\        V4      pV P                  Wg4       \         P                  ! . RO4      \         P                  ! . RO4      \         P                  ! . RO4      3 F=  p\         P
                  R	,          p\        V4      pV P                  WvV,          4       K?  	  \         P                  ! . RO4      p\        V4      pV P                  Wg4       \        VP                  4       4      p\        V\        4      '       g   Q hR# )r   Nr1   )r  :r  NNrf  r7  r  r  :r  r  N)r   r   r  r   r  r  r  r   r  )r   l            r   )r   l            r   )r   l            r   )Nr  N)r   r9  rJ  rz  r  s_r  r  
zeros_liker8  r8  r  r  r  r  )r  r0   r1   r  rA   slcr@   res_arrres1res2s   &          r"   test_trim_zeros_numpy%TestNPFunctions.test_trim_zeros_numpy  s    HH-.HHUOHHW eeAbkC$C##CS2 
 eeCRjC#.C##CS2 
 eeBiC#.C##CS2 
 D--JJ7C 3/Dt9>!> 3/Dt9>!>  hhqkC ) HH]+RXXm-DHH]+-C%%*C$C##CS2	- hh'C ) AHHJ'#t$$$$r$   c           	        V P                  4        \        R R7      ! \        4      pV P                  \        4      ;_uu_ 4       pV! \
        P                  ! . RO. RO.4      4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! 0 Rm4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! . R	O4      ^4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     ELJ; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     Lr; i)
Tr@  Nzarray must be 1Dz#The first argument must be an arrayz$The second argument must be a stringr  r  >   r   r  r  r  )
rF  r   r  rC  r   r   r9  rD  rB  rE  r  s   &  r"   test_trim_zeros_exceptions*TestNPFunctions.test_trim_zeros_exceptions8  sY   !T"=1{++v"((Iy123 ,  !	

 {++v!H ,1  !	

 {++v) ,1  !	

 {++v"((9%q) ,2  !	
/ ,++ ,++ ,+ ,+s0   #F(1	F<G G#(F9	<G	G 	#G3	c           	        \         p\        R R7      ! V4      p\        P                  ! . RO4      \        P                  ! . RO4      3\        P                  ! . RO. RO.4      \        P                  ! . RO4      3\        P                  ! ^ ^4      P                  ^^^4      \        P                  ! . RO4      3\        P                  ! ^ ^
4      P                  ^^4      \        P                  ! ^ ^4      P                  ^^^4      3\        P                  ! . RO4      \        P                  ! . RO4      3.pV F&  w  rEV! WE4      pV! WE4      pV P                  Wg4       K(  	  R# )Tr@  Nr  r6  )r  r+  r  )r  rI     )FTr  )r  r   r   r9  rP  r  r  )r  r  r  r  r0   r1   r  r  s   &       r"   test_union1dTestNPFunctions.test_union1dX  s   T"6* ## )Y/0# 		!R ((1Q/% 		!R ((1-		!R ((1Q/ )*#-
8 DAa{H*C##H2 r$   c           	        \        R R7      ! \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R\
        P                  ! ^^.4      4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! ^^.4      R4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! RR4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! RR.4      \
        P                  ! RR	.4      4       RRR4       V P                  R
\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! RR.4      \
        P                  ! RR.4      4       RRR4       V P                  R
\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! RR.4      \
        P                  ! ^^.4      4       RRR4       V P                  R
\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \
        P                  ! RR.4      \
        P                  ! RR.4      4       RRR4       V P                  R
\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL`; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     L; i)Tr@  r  Nz.The arguments to np.union1d must be array-likeWorldr  r  r0   r1   z/For Unicode arrays, arrays must have same dtyper  r  r  barr3  r4  )
r   r  rF  rC  r   r   r9  rD  rB  rE  r  s   &  r"   test_union1d_exceptions'TestNPFunctions.test_union1d_exceptions|  s   T":.! {++v'288QqE?+ ,<  !	
 {++v"((Aa5/7+ ,<  !	
 {++v'7# ,<  !	
 {++v"((GW-.#s0DE ,=  !	
 {++v"((C:&%(@A ,=  !	
 {++v"((C:&!Q(89 ,=  !	
 {++v"((C:&#s(<= ,=  !	
Q ,++ ,++ ,++ ,++ ,++ ,++ ,+sT    M. M%
M9,6N,6N!,6N5,6O	M"	%M6	9N
	N	!N2	5O		O	c                B   \         p\        R R7      ! V4      pV P                  4        \        P                  ! . RO4      \        P
                  3\        P                  ! . RO4      3. RO3\        P                  ! ^^.^^..4      \        P
                  3R\        P                  3\        P                  ! ^^.\        P                  R7      3\        P                  ! ^$4      P                  ^^^4      3.pV F   pV! V!  pV! V!  pV P                  WV4       K"  	  R# )Tr@  r7  Nr  r  )r  r  )
r  r   rF  r   r9  r
  r  rP  r  r  )r  r  r  r  pairr  r  s   &      r"   test_asarray_chkfinite&TestNPFunctions.test_asarray_chkfinite  s   %T"6*!
 #

 #
 
 1a&1a&)*

 ! !Qrxx0
 		"%%aA.; 
D Dt}H,C##H2 r$   c           
     P   \        R R7      ! \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! ^4       RRR4       RpV P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^^\        P                  ^.4      4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^^\        P                  ^.4      4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! . RO4      R4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL/; i  + '       g   i     L; i  + '       g   i     Lr; i)Tr@  Nz7The argument to np.asarray_chkfinite must be array-likez#array must not contain infs or NaNsr
  z!dtype must be a valid Numpy dtyper  )r   r  rF  rC  r   rD  rB  rE  r  r   r9  r  r"  )r  r  rq  r  s   &   r"   !test_asarray_chkfinite_exceptions1TestNPFunctions.test_asarray_chkfinite_exceptions  sj   T"#78! {++q!H ,Gc3q{{+, z**a"((Aq"&&!,-. +;S=MN z**a"((Aq"&&!,-. +;S=MN {++q"((<()4 ,93q{{;KL% ,++ +**
 +*
 ,+s0   	G/G./H HG+	.G?	H	H%	c           
     r  a \         p\        V4      p\        p\        V4      p\        p\        V4      p\        p\        V4      pR  p	V	! 4        F!  p
V P                  V! V
4      V! V
4      4       K#  	  \        P                  ! . RO4      p\        P                  ! V^4      oV3R lpV P                  V! SR^R7      V! SR^R7      4       V! 4        F%  w  rV P                  V! WR7      V! WR7      4       K'  	  V3R lpV! 4        F(  w  rpV P                  V! WVR7      V! WVR7      4       K*  	  R# )	c               3     "   \         P                  ! ^^^\         P                  ,          ,           .4      x  \         P                  ! ^ \         P                  ^R7      p V R;;,          \         P                  ,          uu&   V x  \         P                  ! ^4      P                  R4      x  \         P                  ! ^^
R7      P                  R4      x  \         P                  ! ^^
R7      P                  R4      x  R# 5i)r  r   :r  NN)stepN)r  r  r6  )r   r9  r  r  rP  r  )phases    r"   inputs12TestNPFunctions.test_unwrap_basic.<locals>.inputs1  s     ((Aq1ruu9}-..KK255a0E"IIK))B-''..))Cb)11%88))Cb)11'::s   D Dc               3      <"   \         P                  ! ^R.4      ^3x  \         P                  ! . RO4      ^3x  \         P                  ! . RO4      ^3x  \         P                  ! . RO4      ^3x  S ^3x  R# 5i)r  Ni  )r   K         rG  )r   r  r  r  r   )r  r  r  r+  r  r  r  r+  r  wrap_unevens   r"   inputs133TestNPFunctions.test_unwrap_basic.<locals>.inputs13  sh     ((Aw<(#--((12C77((+,a//((34a77s""s   A9A<)r>   r  r  c               3      <"   S ^^3x  R# 5i)   Nr  rA  s   r"   	inputs1234TestNPFunctions.test_unwrap_basic.<locals>.inputs123$  s     sC''s   
r  N)r   r>  r?  r@  rG  i  r  )	r  r   r  r  r  r  r   r9  mod)r  r  r  rp  cfunc1pyfunc13cfunc13	pyfunc123cfunc123r;  r  
uneven_seqrC  r  rG  r  rB  s   &               @r"   test_unwrap_basic!TestNPFunctions.test_unwrap_basic  s    Vgx.		?	; A##GAJq	:  XX9:
ffZ-	# 	{C H %k3 G	I "IA##HQ$>$+A$=? $
	( #,+Aw##Ia6=%?$,Q5<%>? #.r$   c                
   \        \        4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R 4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^^.4      R 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^^.4      ^R R7       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^^.4      ^R R7       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^^.4      ^^R7       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL8; i  + '       g   i     L; i  + '       g   i     L; i)	r  Nz#The argument "p" must be array-likez'The argument "discont" must be a scalarr  z&The argument "period" must be a scalarr=   z&The argument "axis" must be an integerz*Value for argument "axis" is not supported)r   r  rF  rC  r   rD  rB  rE  r   r9  r  )r  r  rq  s   &  r"   test_unwrap_exception%TestNPFunctions.test_unwrap_exception-  s   V!{++q%L ,;!++&	( {++q"((Aq6"E* ,?!++&	( {++q"((Aq6"Ae4 ,>!++&	( {++q"((Aq6"AE2 ,>!++&	( z**a"((Aq6"AA. +B!++&	(- ,++
 ,++
 ,++
 ,+
 +*s;   	H# H7:"I&"I"I2#H4	7I	I	I/	2J	c                >   \         p\        R R7      ! V4      pR pV! 4        Fv  p\        VP                  ) VP                  4       FN  p\        VP                  ) VP                  4       F&  pV! WEV4      pV! WEV4      pV P	                  Wx4       K(  	  KP  	  Kx  	  R# )Tr@  c               3      "   \         P                  ! ^
4      x  \         P                  ! ^
4      P                  ^^4      x  \         P                  ! ^<4      P                  ^^^4      x  R# 5irv  r  r  r$   r"   rr  9TestNPFunctions.test_swapaxes_basic.<locals>.a_variationsN  sK     ))B-))B-''1--))B-''1a00s   A,A.N)r  r   r  ndimr  )	r  r  r  rr  r0   r  r  r  r  s	   &        r"   test_swapaxes_basic#TestNPFunctions.test_swapaxes_basicJ  s    T"6*	1
 AQVVGQVV,0B%aR0Hr*C++H: 1 -  r$   c                ,   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R^ ^ 4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      R^ 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      ^ R4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      ^^ 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      P                  ^^4      ^ R	4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELB; i  + '       g   i     L; i  + '       g   i     L; i)
Tr@  r  N'The first argument "a" must be an arrayz.The second argument "axis1" must be an integerz-The third argument "axis2" must be an integerz)np.swapaxes: Argument axis1 out of boundsz)np.swapaxes: Argument axis2 out of boundsr  )r  r   rF  rC  r   rD  rB  rE  r   rP  r  r  rG  s   &   r"   test_swapaxes_exception'TestNPFunctions.test_swapaxes_exceptionZ  s   T"6* 	!{++v%A , 	?&**+	- {++v"))A,q) , 	F&**+	- {++v"))A,5) , 	E&**+	- z**f"))A,1% + 	A&**+	- z**f"))A,&&q!,a4 + 	A&**+	-7 ,++ ,++ ,++ +* +*s<   H4II-I0/J4I	I	I-	0J 	J	c                    \         p\        R R7      ! V4      p\        P                  ! ^x4      P	                  ^^^^^4      pR F(  w  rEV! W4V4      pV! W4V4      pV P                  Wg4       K*  	  R# )Tr@  N))r   r  )r  r  )r5  )r  r  )r5  )r  r  )r  r  )r  r  )r  r   r   rP  r  r  )r  r  r  r0   r  r  r  r  s   &       r"   test_moveaxis_basic#TestNPFunctions.test_moveaxis_basic  sm    T"6*IIcN""1aAq1$
F a5H;/C##H2$
r$   c                b   \         p\        R R7      ! V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R^ ^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      R^ 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      ^ R4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      ^^ 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      P                  ^^4      RR4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      P                  ^^4      RR4       RRR4       V P                  R	\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! \        P                  ! ^4      P                  ^^4      RR4       RRR4       V P                  R
\        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL4; i  + '       g   i     EL; i  + '       g   i     ELz; i  + '       g   i     EL; i  + '       g   i     L; i)Tr@  r  Nr\  z7second argument "source" must be an integer or sequencez;third argument "destination" must be an integer or sequencez*np.moveaxis: Argument source out of boundsz/np.moveaxis: Argument destination out of boundsz-np.moveaxis: repeated axis in source argumentz2np.moveaxis: repeated axis in destination argumentr5  r`  r   r   r8  )r  r   rF  rC  r   rD  rB  rE  r   rP  r  r  rG  s   &   r"   test_moveaxis_exception'TestNPFunctions.test_moveaxis_exception  s   T"6* 	!{++v%A , 	?&**+	- {++v"))A,q) , 	E  !	# {++v"))A,5) , 	I  !	# z**f"))A,1% + 	B&**+	- z**f"))A,&&q!,fh? + 	G&**+	- z**f"))A,&&q!,ff= + 	E&**+	- z**f"))A,&&q!,fg> + 	J&**+	-S ,++ ,++ ,++ +** +** +** +*sT   L&L:M-M"/M6/N
/N&L7	:M	M	"M3	6N	
N	N.	c                   \         P                  ! ^4      P                  R4      p\        R 4       p\         P                  ! ^^.\         P
                  R7      pV P                  V! W4      VP                  W4      4       R p\        RVP                  4       FI  pV! V4      p\         P                  ! WR7      pV P                  V! W4      VP                  W4      4       KK  	  R# )   c                 2    \         P                  ! WR R7      # )Nr=   r   take_along_axis)r0   r  s   &&r"   	axis_none7TestNPFunctions.test_take_along_axis.<locals>.axis_none  s    %%a66r$   r7  c                 &   a  \         V 3R  l4       pV# )c                 2   < \         P                  ! WS4      # r   rj  r0   r  r>   s   &&r"   impl?TestNPFunctions.test_take_along_axis.<locals>.gen.<locals>.impl      ))!55r$   r   r>   rq  s   f r"   gen1TestNPFunctions.test_take_along_axis.<locals>.gen      6 6Kr$   r=   N)r  r  r  r  r  )r   rP  r  r   r9  r  r  r  r  rX  r  )r  r0   rl  r   rv  r  jfuncais   &       r"   test_take_along_axis$TestNPFunctions.test_take_along_axis  s    IIbM!!,/ 
	7 
	7 ((Aq63	! 5 ) 1 1! =	?	 r166"AFEA&B##E!L%--2FG #r$   c                2   \         P                  ! R4      p\         P                  ! R\         P                  R7      pR pR FQ  pV! V4      pVP                  W4      pV! W4      pV P	                  Wg4       V P                  VP                  R4       KS  	  R# )r  r7  c                 &   a  \         V 3R  l4       pV# )c                 2   < \         P                  ! WS4      # r   rj  rp  s   &&r"   rq  LTestNPFunctions.test_take_along_axis_broadcasting.<locals>.gen.<locals>.impl  rs  r$   rt  ru  s   f r"   rv  >TestNPFunctions.test_take_along_axis_broadcasting.<locals>.gen  rx  r$   N)r  r  r  )r  r  r+  )r  r  )r  r  r+  )r   r  intpr  r  r~  r  )r  r@   rz  rv  r  r"  r  actuals   &       r"   !test_take_along_axis_broadcasting1TestNPFunctions.test_take_along_axis_broadcasting  sy    
 ggi WWYbgg.	 AFE}}S-H3^F##H5V\\95 r$   c           
     n
   \         P                  ! ^4      P                  ^^4      p\         P                  ! ^ ^.\         P                  R7      p\         P
                  ! R\         P                  R7      pR pV P                  \        4      ;_uu_ 4       pV! R4      ! W4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4      ! W4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^4      ! W4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4      ! ^V4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4      ! V^4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4      ! V\         P                  ! R	R
.4      4       RRR4       V P                  R\        VP                  4      4       \        R 4       pV P                  \        4      ;_uu_ 4       pV! W^ 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^ 4      ! V\         P                  ! ^ ^.\         P                  R7      4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! R4      ! W4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^ 4      ! V\         P
                  ! R\         P                  R7      4       RRR4       V P                  R\        VP                  4      4       V P                  4        R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELK; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELc; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELf; i  + '       g   i     L; i)r  r7  c                 &   a  \         V 3R  l4       pV# )c                 2   < \         P                  ! WS4      # r   rj  rp  s   &&r"   rq  JTestNPFunctions.test_take_along_axis_exceptions.<locals>.gen.<locals>.impl  rs  r$   rt  ru  s   f r"   rv  <TestNPFunctions.test_take_along_axis_exceptions.<locals>.gen  rx  r$   r0   Nzaxis must be an integerzaxis is out of boundsz"arr" must be an arrayz"indices" must be an arrayr'  r%  z#indices array must contain integersc                 0    \         P                  ! WV4      # r   rj  rp  s   &&&r"   not_literal_axisITestNPFunctions.test_take_along_axis_exceptions.<locals>.not_literal_axis  s    %%aD11r$   zaxis must be a literal valuez'must have the same number of dimensionszdimensions don't matchr  r  r  )r   rP  r  r9  r  r  rC  r   rD  rB  rE  r   r  rF  )r  arr2dindices_noner   rv  rH  r  s   &      r"   test_take_along_axis_exceptions/TestNPFunctions.test_take_along_axis_exceptions  s   		!$$Q*xxAbii8''&		2	 {++vHU$ ,/V5E5E1FG{++vGE# ,-s63C3C/DE{++vF5" ,-s63C3C/DE{++vIb,' ,.F4D4D0EF{++vIeQ ,2C8H8H4IJ{++vIeRXXsCj12 ,1  !	

 
	2 
	2 {++vUQ/ ,4c&:J:J6KL{++vF5"((Aq6;< ,?&**+	- {++vIe# ,?&**+	- z**fF5"''&		:; +.F4D4D0EF!e ,++ ,++ ,++ ,++ ,++ ,++ ,++ ,++ ,++
 +*sx   Q0.RR R,:S &S
S($6S<$T=4T$0R	R	R)	,R=	 S	S%	(S9	<T	T!	$T4	c                f   \         P                  ^RR\        \         P                  ) \         P                  4      \        \         P                  \         P                  4      \         P                  ! ^.\
        R7      \         P                  ! \        \         P                  ) \         P                  4      \        ^\         P                  4      \        \         P                  ^4      \        \         P                  \         P                  ) 4      .4      \         P                  ! . RO4      \         P                  ! . RO4      \         P                  ! . RO. RO.4      \         P                  ! R\         P                  R.4      \         P                  ! R\         P                  R.\         P                  RR..4      \         P                  ! \         P                  ) \         P                  \         P                  .4      \         P                  ! \         P                  ) \         P                  \         P                  .\         P                  R7      .pR^
.pRR	.pRR.p\        p\        \        4      p\        WW44       F+  w  rxrV! WxWR
7      pV! WxWR
7      pV P                  W4       K-  	  R# )r  r3  r7  r  皙?r  r~  r'  Nr  )r  r  r  r  )r  r%  r  r  )r  r  r~       @)r   r  r  r"  r9  r  r
  r  r   r   r  )r  rA   r  posinfsneginfsr  r  valuer  r  r  r  r  s   &            r"   test_nan_to_numTestNPFunctions.test_nan_to_num2  s    FFRVVGRVV$BFFBFF#HHaS$HHgrvvgrvv.2660Bbffa('"&&266'*BD EHH_%HHYHHo78HHc2663'(HHsBFFC(2663*<=>HHrvvgrvvrvv./HHrvvgrvvrvv.bjjA!
$ Ry./Z *1'+
&E eVKHvEC##H2+
r$   c           
        \        \        4      p\        P                  ! R R\        P                  \        P
                  \        P
                  ) .4      p\        P                  ! . RO4      pV! VRV^ ,          V^,          V^,          R7       V P                  VRR V4       \        P                  ! R R\        \        P                  \        P                  4      \        \        P
                  \        P                  4      \        \        P                  \        P
                  ) 4      .4      pV! VRV^ ,          V^,          V^,          R7       V P                  VRR \        P                  ! . RO4      4       R# )r  r  Fr  N)r%  r  r  r  )r  y     @@      ?y      ?     @)r   r  r   r9  r  r"  r  r  )r  r  r!   r  	x_complexs   &    r"   test_nan_to_num_copy_false*TestNPFunctions.test_nan_to_num_copy_falseU  s   Z HHc3898823A;A;	
 	"#1HH''(
	 	A;A;	
 	bcNHH78	
r$   c                    \        \        4      pV P                  4       ;_uu_ 4       pV! R 4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)invalid_inputNz4The first argument must be a scalar or an array-like)r   r  r  rD  rB  rE  r  s   &  r"    test_nan_to_num_invalid_argument0TestNPFunctions.test_nan_to_num_invalid_argumenty  sP    Z ##%%/" &L&**+	- &%s   	A  A0	c                    \         p\        V4      p\        p\        V4      pR  pV! 4        FA  w  rgV P                  V! V4      V! V4      4       V P                  V! Wg4      V! Wg4      4       KC  	  R# )c               3     "   \         P                  ! ^^.4      ^3x  \         P                  ! ^^.^^..4      R3x  \         P                  ! ^4      P                  R4      ^3x  ^^.^3x  \         P                  ! . 4      ^3x  R# 5i)r  Nr  r9  r  r  r$   r"   r  3TestNPFunctions.test_diagflat_basic.<locals>.inputs  sy     ((Aa5/1$$((QqE1Q%=)2--))A,&&w/22a&!)O((2,/!s   B
BN)r  r   r  r  )r  rp  rJ  rq  rP  r  ra   r   s   &       r"   test_diagflat_basic#TestNPFunctions.test_diagflat_basic  sc    gg	" HDA##GAJq	:##GAM6!<@ r$   c                   \         p\        V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R 4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)r  N#The argument "v" must be array-like)r  r   rF  rC  r   rD  rB  rE  rG  s   &   r"   test_diagflat1_exception(TestNPFunctions.test_diagflat1_exception  sa    V!{++v%L ,;&**+	- ,+s   	A77B	c                   \         p\        V4      pV P                  4        V P                  \        4      ;_uu_ 4       pV! R ^4       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^.R 4       RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^.R4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)r  Nr  z#The argument "k" must be an integerr  )r  r   rF  rC  r   rD  rB  rE  rG  s   &   r"   test_diagflat2_exception(TestNPFunctions.test_diagflat2_exception  s    V!{++v%O ,;&**+	- {++v1a&%  ,;&**+	- {++v1a&# ,;&**+	- ,+
 ,+
 ,+s#   
D$D7)E
$D4	7E	
E	c               #    "   \         P                  ! \        P                  4      \         P                  ! \        P                  4      3x  ^.\         P                  ! \        P                  4      3x  \         P                  ! \        P                  4      ^.3x  ^.^.3x  ^.^.3x  ^^.^.3x  . RO^^.3x  . RO. RO3x  ^^.^^.3x  . RO. RO3x  . RO^^.3x  . RO. RO3x  . RO. RO3x  . R	O. R
O3x  R# 5i)r  Nr  r  r  r  r  r  r  r  r   r  r  )r  r+  r  )r  r  r  r  r9  r  r  r$   r"   _setxor_arraysTestNPFunctions._setxor_arrays  s     u}}-u}}-/ 	/c4??5==111ooemm,qc11cA3hcA3h!fqck!Q""!fq!fn""QF"" O++""...s   DD
c                   a aa \         o\        S4      oVVV 3R  lpS P                  4        F  w  r#V! W#4       K  	  R# )c                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! W4      pS! W4      pSP                  W#R V  RV 2R7       R# zar1=z, ar2=rX  Nr  r  r
   r  ar1ar2r  r  r  r  r  s   &&  r"   r"  .TestNPFunctions.test_setxor1d_2.<locals>.check  c    #t$$3i#t$$3i *HC%C##HcU&7N#Or$   N)r  r   r  r  r"  r0   r1   r  r  s   f   @@r"   test_setxor1d_2TestNPFunctions.test_setxor1d_2  s5    !	O		P '')DA!K *r$   c                R  a aa \         o\        S4      oRVVV 3R llpS P                  4        Ft  w  r#V! W#4       \        \        P
                  ! V4      4      \        V4      8X  g   K<  \        \        P
                  ! V4      4      \        V4      8X  g   Kk  V! W#R4       Kv  	  R# )Fc                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WV4      pS! WV4      pSP                  W4R V  RV 2R7       R# r  r  r  r  r9   r  r  r  r  r  s   &&&  r"   r"  .TestNPFunctions.test_setxor1d_3.<locals>.check  g    #t$$3i#t$$3i =9HCm4C##HcU&7N#Or$   TNrl  )r  r   r  r8  r   r  r  s   f   @@r"   test_setxor1d_3TestNPFunctions.test_setxor1d_3  sv    !	O		P 	P '')DA!K299Q< CF*s299Q</@CF/JaD! *r$   c                6   \         p\        V4      p\        P                  ! ^.4      p\        P                  ! ^.4      pV P	                  4        V P                  \        4      ;_uu_ 4        V! W4R4       RRR4       V P                  \        4      ;_uu_ 4        V! RVR4       RRR4       V P                  \        4      ;_uu_ 4        V! VRR4       RRR4       R#   + '       g   i     Lr; i  + '       g   i     LU; i  + '       g   i     R# ; ir  )r  r   r   r9  rF  rC  r   r  s   &    r"   test_setxor1d_errors$TestNPFunctions.test_setxor1d_errors  r  r  c               #     "   \         P                  ! \        P                  4      \         P                  ! \        P                  4      3x  ^.\         P                  ! \        P                  4      3x  \         P                  ! \        P                  4      ^.3x  ^.^.3x  ^.^.3x  ^^.^.3x  . RO^^.3x  . RO. RO3x  ^^.^^.3x  . RO. RO3x  . RO^^.3x  \        P
                  ! . RO4      \        P
                  ! . RO4      3x  \        P                  ! ^4      \        P                  ! ^4      3x  \        P
                  ! . RO4      \        P
                  ! . R	O4      3x  R# 5i)
r  Nr  r  r  r  )r  r+  r  r  r  r  r  r  )r  r  r  r  r  r  r+  r6  )r  r+  r  )r
   r  r	   r7  r   r9  rP  r  r$   r"   _setdiff_arraysTestNPFunctions._setdiff_arrays  s1    u}}-u}}-/ 	/c4??5==111ooemm,qc11cA3hcA3h!fqck!Q""!fq!fn""QF"" xx01xx-.0 	0iimRYYr]**hhy!288I#666s   E<E>c                   a aa \         o\        S4      oVVV 3R  lpS P                  4        F  w  r#V! W#4       K  	  R# )c                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! W4      pS! W4      pSP                  W#R V  RV 2R7       R# r  r  r  s   &&  r"   r"  /TestNPFunctions.test_setdiff1d_2.<locals>.check  r  r$   N)r  r   r  r  s   f   @@r"   test_setdiff1d_2 TestNPFunctions.test_setdiff1d_2  s5    "	O		P ((*DA!K +r$   c                R  a aa \         o\        S4      oRVVV 3R llpS P                  4        Ft  w  r#V! W#4       \        \        P
                  ! V4      4      \        V4      8X  g   K<  \        \        P
                  ! V4      4      \        V4      8X  g   Kk  V! W#R4       Kv  	  R# )Fc                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WV4      pS! WV4      pSP                  W4R V  RV 2R7       R# r  r  r  s   &&&  r"   r"  /TestNPFunctions.test_setdiff1d_3.<locals>.check  r  r$   TNrl  )r  r   r  r8  r   r  r  s   f   @@r"   test_setdiff1d_3 TestNPFunctions.test_setdiff1d_3  sv    "	O		P 	P ((*DA!K299Q< CF*s299Q</@CF/JaD! +r$   c                6   \         p\        V4      p\        P                  ! ^.4      p\        P                  ! ^.4      pV P	                  4        V P                  \        4      ;_uu_ 4        V! W4R4       RRR4       V P                  \        4      ;_uu_ 4        V! RVR4       RRR4       V P                  \        4      ;_uu_ 4        V! VRR4       RRR4       R#   + '       g   i     Lr; i  + '       g   i     LU; i  + '       g   i     R# ; ir  )r  r   r   r9  rF  rC  r   r  s   &    r"   test_setdiff1d_errors%TestNPFunctions.test_setdiff1d_errors-  s    "	O	HHaSMHHaSM!{++aE" ,{++eQ% ,{++a% ,+	 ,++++++r  c               #  v  "   \         P                  ! \        P                  4      \         P                  ! \        P                  4      3x  ^.\         P                  ! \        P                  4      3x  \         P                  ! \        P                  4      ^.3x  ^.^.3x  ^.^.3x  ^^.^.3x  . RO^^.3x  . RO. RO3x  ^^.^^.3x  . RO. RO3x  . RO^^.3x  ^^.\        P
                  ! ^4      3x  ^^.\        P                  ! \        P
                  ! ^4      ^4      3x  R# 5i)r  Nr  r  r  r  )r
   r  r	   r7  r   rP  rF  r  r$   r"   _in1d_arraysTestNPFunctions._in1d_arrays;  s    u}}-u}}-/ 	/c4??5==111ooemm,qc11cA3hcA3h!fqck!Q""!fq!fn""QF""!fbiim##!fbggbiilA...s   D7D9znp.in1d removed in NumPy 2.4+c                   a aa \         o\        S4      oVVV 3R  lpS P                  4        F  w  r#V! W#4       K  	  R# )c                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! W4      pS! W4      pSP                  W#R V  RV 2R7       R# r  r  r  s   &&  r"   r"  *TestNPFunctions.test_in1d_2.<locals>.checkQ  r  r$   N)r  r   r  r  s   f   @@r"   test_in1d_2TestNPFunctions.test_in1d_2L  s5    	O		P %%'DA!K (r$   c                T  a aa \         o\        S4      oRVVV 3R llpS P                  4        Fu  w  r#V! W#4       \        \        P
                  ! V4      4      \        V4      8X  g   K<  \        \        P
                  ! V4      4      \        V4      8X  g   Kk  V! W#RR7       Kw  	  R# )Fc                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WV4      pS! WV4      pSP                  W4R V  RV 2R7       R# r  r  r  s   &&&  r"   r"  +TestNPFunctions.test_in1d_3a.<locals>.checkb  r  r$   Tr  Nrl  )r  r   r  r8  r   r  r  s   f   @@r"   test_in1d_3aTestNPFunctions.test_in1d_3a]  sv    	O		P 	P %%'DA!K299Q< CF*s299Q</@CF/Ja$/ (r$   c                   a aa \         o\        S4      oRVVV 3R llpS P                  4        F  w  r#V! W#R R7       V! W#RR7       K  	  R# )Fc                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WV4      pS! WV4      pSP                  W4R V  RV 2R7       R# r  r  r  r  r  r  r  r  r  r  s   &&&  r"   r"  +TestNPFunctions.test_in1d_3b.<locals>.checku  sg    #t$$3i#t$$3i 62HCf-C##HcU&7N#Or$   r  TNrl  )r  r   r  r  s   f   @@r"   test_in1d_3bTestNPFunctions.test_in1d_3bp  H    	O		P 	P %%'DA!u%!t$ (r$   c                  a aa \         o\        S4      oRVVV 3R llpS P                  4        F  w  r#V! W#R R7       V! W#RR7       \        \        P
                  ! V4      4      \        V4      8X  g   KH  \        \        P
                  ! V4      4      \        V4      8X  g   Kw  V! W#RR R7       V! W#RRR7       K  	  R# )Fc                    < \        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WW#4      pS! WW#4      pSP                  WER V  RV 2R7       R# r  r  	r  r  r9   r  r  r  r  r  r  s	   &&&&  r"   r"  *TestNPFunctions.test_in1d_4.<locals>.check  sg    #t$$3i#t$$3i =AHCm<C##HcU&7N#Or$   r  Tr9   r  NFF)r  r   r  r8  r   r  r  s   f   @@r"   test_in1d_4TestNPFunctions.test_in1d_4  s    	O		P 	P %%'DA!u%!t$299Q< CF*s299Q</@CF/Ja$u=a$t< (r$   c                N   \         p\        V4      p\        P                  ! ^.4      p\        P                  ! ^.4      pV! W44      pV P	                  V\        P                  ! R.4      4       V P                  4        V P                  \        4      ;_uu_ 4        V! W4RR4       RRR4       V P                  \        4      ;_uu_ 4        V! W4RR4       RRR4       V P                  \        4      ;_uu_ 4        V! RVRR4       RRR4       V P                  \        4      ;_uu_ 4        V! VRRR4       RRR4       \        4       R 4       pV P                  \        4      ;_uu_ 4        V! W4RR7       RRR4       V P                  \        4      ;_uu_ 4        V! W4RR7       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r  Fr  NTc                 2    \         P                  ! WVR 7      # kindr  r0   r1   r  s   &&&r"   np_in1d_kind6TestNPFunctions.test_in1d_errors.<locals>.np_in1d_kind      771d++r$   r  table)r  r   r   r9  r  rF  rC  r   )r  r  r  r0   r1   r!   r  s   &      r"   test_in1d_errors TestNPFunctions.test_in1d_errors  sy   	O	HHaSMHHaSMaO288UG#45!{++aE5) ,{++aE5) ,{++eQe, ,{++ae, , 
	, 
	, {++D) ,{++G, ,+ ,++++++++ ,++++H   F3G<G-G-.H H3G	G	G*	-G=	 H	H$	c                Z    \         '       d   V P                  4       # V P                  4       # r   )r   _isin_arrays_reduced_isin_arrays_full)r  s   &r"   _isin_arraysTestNPFunctions._isin_arrays  s%    ?++--((**r$   c               #     "   ^.^.3x  ^.^.3x  ^^.^^.3x  \         P                  ! ^4      P                  ^^.4      p \         P                  ! ^^.4      pW3x  R# 5ir  r  r/   s     r"   r	  $TestNPFunctions._isin_arrays_reduced  sj      cA3hcA3h!fq!fn IIaL  !Q(HHaVd
s   A!A#c               #  @  "   \         P                  ! \        P                  4      \         P                  ! \        P                  4      3x  \        P
                  ! R\        P                  R7      \         P                  ! \        P                  4      3x  \        P
                  ! R\        P                  R7      \         P                  ! \        P                  4      3x  \        P
                  ! R\        P                  R7      \         P                  ! \        P                  4      3x  ^.\         P                  ! \        P                  4      3x  \         P                  ! \        P                  4      ^.3x  ^.^.3x  ^.^.3x  ^^.^.3x  . R	O^^.3x  . R	O. R
O3x  ^^.^^.3x  ^^.\        P                  ! ^4      3x  ^^.\        P                  ! \        P                  ! ^4      ^4      3x  \        P                  ! ^4      P                  ^^^4      . RO3x  \        P                  ! ^4      P                  . RO4      p \        P                  ! . RO. RO. RO.4      pW3x  \        P                  ! ^4      V3x  V \        P                  ! ^4      3x  \        P                  ! ^4      \        P                  ! ^4      3x  ^V3x  V ^3x  Rx  \         P                  ! \        P                  4      V3x  V \         P                  ! \        P                  4      3x  \        \        P                  \        P                  3 F  pV\        P                  \        P                  09   d   \        P                  ! . ROVR7      pM$V\        09   d   \        P                  ! . RO4      p\        P                  ! . VR7      pVX3x  W43x  WD3x  K  	  R EF  p. RO. ROV,          3x  . RO. ROV,          3x  . RO. ROV,          3x  . ROp V . ROV,          3x  V . ROV,          . ROV,          ,           3x  \        P                  ! . RO4      \        P                  ! . ROV,          4      3x  \        P                  ! . RO4      \        P                  ! . ROV,          4      3x  \        P                  ! ^^.4      \        P                  ! ^^.V,          4      3x  EK  	  \        P                  ! ^.4      \        P                  ! ^.4      3x  \        P                  ! RR.4      \        P                  ! . RO4      3x  \        P                  \        P                  3\        P                  \        P                  3\        P                  \        P                  3\        P                  \        P                  3\        P                  \        P                  3\        P                  \        P                  33 F  w  rg\        P                   ! V\        P"                  4      p\        P                  ! . ROVR7      p	V'       d   \        P                  ! . ROVR7      p
M\        P                  ! . ROVR7      p
W3x  K  	  \        P$                  R,           FE  p\        P                  ! . RO\        R7      p \        P                  ! . ROVR7      pW3x  W3x  KG  	  R# 5i) r  r7  TF
AllIntegerN)r  r   rd  r5  r  r  )r+  r  rN  r  r6  )rN  rI  r  r  )r     !   rl  )TFF)r  rN  r  r  )r  r  r  r  )r  r  r  r  )r+  r  r+  r  r  r  r  r  r  r+  r  r  r+  r+  )r+  r+  r  )r+  r  r  r  r  )r  r  r  r  r  r+  r  )r   r   r  r  )ir      )r	  r      )r   r   r   r   )r
   r  r	   r7  r   r  r  rP  rF  r  r9  r  rK  r  rU  uint16r  signedinteger	typecodes)r0   r1   r8  arempty_arraymultdtype1dtype2is_dtype2_signedr  r  s              r"   r	  !TestNPFunctions._isin_arrays_full  s    u}}-u}}-/ 	/xxbhh/u{{+- 	-xxbhh/u{{+- 	-xxbhh/u{{+- 	-c4??5==111ooemm,qc11cA3hcA3h!fqck!Q""!fq!fn!fbiim##!fbggbiilA...iim##Aq!,n<< IIbM!!),HHlI|<=d
hhqk1n!nhhqk288A;&&d
d

ooekk*A-----BHHbjj1E2::..XXl%84&XX23((2U3Kr/!/!** 2 D$ 666$ 666$ 666:AY%%%Y%	D(8888((<("((?T3I*JJJ((?+RXX6H46O-PPP((Aq6"BHHaVd]$;;;  hhsmRXXqc]**hhe}%rxx0E'FFF WWbhhXXrwwXXryy!YY!XXrxx XXrxx 
NF  "}}VR5E5EF((<v6Chh~V<hh}F;(N!
$ \\,//E-T:AU3A$J$J	 0s   \\c                   a aa \         o\        S4      oVVV 3R  lpS P                  4        F  w  r#V! W#4       K  	  R# )c                    < S! W4      p\        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! W4      pSP                  W#R V  RV 2R7       R# r  r  r  s   &&  r"   r"  *TestNPFunctions.test_isin_2.<locals>.check!  sc     *H#t$$3i#t$$3iC%C##HcU&7N#Or$   N)r  r   r	  r  s   f   @@r"   test_isin_2TestNPFunctions.test_isin_2  s5    	O		P %%'DA!K (r$   c                  a aa \         o\        S4      oRVVV 3R llpS P                  4        F{  w  r#V! W#4        \        V4      p \        V4      p\        \
        P                  ! V4      4      V8X  g   KK  \        \
        P                  ! V4      4      V8X  g   Kq  V! W#RR7       K}  	  R#   \         d    ^p Lwi ; i  \         d    ^p L~i ; i)Fc                    < S! WV4      p\        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WV4      pSP                  W4R V  RV 2R7       R# r  r  r  s   &&&  r"   r"  +TestNPFunctions.test_isin_3a.<locals>.check2  sg     =9H#t$$3i#t$$3iCm4C##HcU&7N#Or$   Tr  Nrl  )r  r   r	  r8  r  r   r  r  r"  r0   r1   len_alen_br  r  s   f     @@r"   test_isin_3aTestNPFunctions.test_isin_3a-  s    	O		P 	P %%'DA!KAA 299Q< E)c"))A,.?5.Ha$/ (
    s#   B0	C0C ?C CCc                   a aa \         o\        S4      oRVVV 3R llpS P                  4        F  w  r#V! W#R R7       V! W#RR7       K  	  R# )Fc                    < S! WV4      p\        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WV4      pSP                  W4R V  RV 2R7       R# r  r  r  s   &&&  r"   r"  +TestNPFunctions.test_isin_3b.<locals>.checkN  sg     62H#t$$3i#t$$3iCf-C##HcU&7N#Or$   r  TNrl  )r  r   r	  r  s   f   @@r"   test_isin_3bTestNPFunctions.test_isin_3bI  r  r$   c                  a aa \         o\        S4      oRVVV 3R llpS P                  4        F  w  r#V! W#R R7       V! W#RR7        \        V4      p \        V4      p\        \
        P                  ! V4      4      V8X  g   KW  \        \
        P                  ! V4      4      V8X  g   K}  V! W#RR R7       V! W#RRR7       K  	  R#   \         d    ^p Li ; i  \         d    ^p Li ; i)Fc                    < S! WW#4      p\        V \        4      '       d   \        V 4      p \        V\        4      '       d   \        V4      pS! WW#4      pSP                  WER V  RV 2R7       R# r  r  r  s	   &&&&  r"   r"  *TestNPFunctions.test_isin_4.<locals>.check`  sg     =AH#t$$3i#t$$3iCm<C##HcU&7N#Or$   r  Tr  Nr  )r  r   r	  r8  r  r   r  r!	  s   f     @@r"   test_isin_4TestNPFunctions.test_isin_4[  s    	O		P 	P %%'DA!u%!t$AA 299Q< E)c"))A,.?5.Ha$u=a$t< (    s$   	CCCCC+*C+c                N   \         p\        V4      p\        P                  ! ^.4      p\        P                  ! ^.4      pV! W44      pV P	                  V\        P                  ! R.4      4       V P                  4        V P                  \        4      ;_uu_ 4        V! W4RR4       RRR4       V P                  \        4      ;_uu_ 4        V! W4RR4       RRR4       V P                  \        4      ;_uu_ 4        V! RVRR4       RRR4       V P                  \        4      ;_uu_ 4        V! VRRR4       RRR4       \        4       R 4       pV P                  \        4      ;_uu_ 4        V! W4RR7       RRR4       V P                  \        4      ;_uu_ 4        V! W4RR7       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r  Fr  NTc                 2    \         P                  ! WVR 7      # r  r  r  s   &&&r"   np_isin_kind6TestNPFunctions.test_isin_errors.<locals>.np_isin_kind  r  r$   r  r  )r  r   r   r9  r  rF  rC  r   )r  r  r  r0   r1   r!   r2	  s   &      r"   test_isin_errors TestNPFunctions.test_isin_errorsy  sy   	O	HHaSMHHaSMaO288UG#45!{++aE5) ,{++aE5) ,{++eQe, ,{++ae, , 
	, 
	, {++T* ,{++G, ,+ ,++++++++ ,++++r	  c                @   \        \        4      p\        \        4      p\        \        4      p\        \        4      p\
        P                  ! . RO4      p\
        P                  ! . RO4      pV! WV4      pV! WV4      pV! WV4      p	V! W4      p
V P                  Wz4       R# )r+  N)r+  r  r  r  r  )r  r  r  r  r  r  r+  )r   r  r6   r  r  r   r9  r  )r  nb_setxor1dnb_intersect1d
nb_union1dnb_setdiff1dr0   r1   c1aux1aux2c2s   &          r"   test_setops_manyways$TestNPFunctions.test_setops_manyways  s}    =)m,*%
N+HH_%HH*+a#!$%'r$   )r  )NNFNr   rk  r  (  r  r  r  r  __doc__r  r  r=  rI  rg  rs  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r%  r;  rD  rL  rP  rT  rY  r\  rb  re  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r.  r9  rB  rI  rS  rX  staticmethodrQ  rm  rs  rx  r{  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r"  r+  r0  rP  rS  r\  r_  rd  rg  ry  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r-  r0  r9  r?  rD  rG  rS  rZ  r_  rb  rn  rs  rv  ry  r  r  r  r  r  r  unittest
skipUnlessr   r  skipIfr   rG  r  r  rJ  r  r  skipr  r  rP  r  r  rS  r  r  r  r  r  r  r  r$  r'  r*  r.  r1  rA  rF  r  rP  r   rT  rX  r\  rf  rj  rr  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r	  r  r"  r%  r)  r.  r2  r5  rP  rS  rY  r]  ra  re  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  classmethodr	  r	  r	  r	  r   r$	  r)	  r.	  r4	  r?	  r  r  __classcell__)r  r!  s   @@r"   r  r  %  s    -+CZ=)~	"68p-!^, 	"34	
3@ 7D&3&3$"B3<!"F	7"*/.7@7&7(D?L3<3"	7-&
7-&`DM^.8`'>R4<#|: !F*6X1C*<0;@
?!B!F.,%#N
II" ' '>	I	4



8<I$I45@P45@P?-*Q9E@HB**,(,(  >>&&qAfkDZ	=	@ KD"QH D$L	C	F P P4"0H = = = =  $  ;z 	 	   
 
 /- /-b!#F'-*?-.?K(P8-P8@:-(3>-23@-<T6l37F089t9"-- (BT1474+M.^&P %896 :6 __]f,.NO)1   P D %89: :: __]f,.NO+5 8! P8!t %89@ :@ __]f,.NO]]123;  3 P %89< :< __]f,.NO,7 +# P+#Z %89@ :@ __]f,.NO.; / P/0 %89E :E __]f,.NO3@ *D P*DX]6~>:@828636@	43Bb-HL+7Z/Ab __Z22N4OPF QF6C;J&'BR
<3 3<L<\32()T I I>U8n8,t1Jf5;n-1^13f?
B,3\#
J"3H7%r
@"3H0
d*3XM28?t(:; #-J3"1-fH.6,@"D!3F"
H-A"	--* / /& "$& 7 7( "$& / /  __]f,.MN O  __]f,.MN0 O0$ __]f,.MN% O%" __]f,.MN= O=( __]f,.MN- O-8 + + 	 	 S Sj  0 06 % %" = =:-8( (r$   r  c                      a  ] tR tRt o RtR tR t]P                  ! ]	R8  R4      R 4       t
R tR t]P                  ! ]	R8  R	4      ]P                  R
 4       4       tRtV tR# )TestNPMachineParametersi  z0
def foo():
    ty = np.%s
    return np.%s(ty)
c                    Tp\        R R7      ! V4      pV! V!  pV! V!  pV F'  pV P                  \        Wh4      \        Wx4      4       K)  	  R# r  )r   r  getattr)	r  r  attrsrn   r  r  r  r  attrs	   &&&*     r"   r"  TestNPMachineParameters.check  sQ    T"6*4=Tl D##GH$;$+C$68 r$   c                    VP                   pVP                   pV P                  W43,          p/ p\        \        VR R4      \	        4       V4       VR,          # )z<string>execr  )r  templaterQ	  compileglobals)r  basefunctytystrbasestrfuncstrdcts   &&&    r"   create_harcoded_variant/TestNPMachineParameters.create_harcoded_variant  sO     ##--5"22WWj&179cB5zr$   zNumPy < 1.24 requiredc                6    RpV P                  \        V4       R# )ibetaN)r^	  itmachepr  negepepsnegiexpminexpxminmaxexpxmaxirndngrdepsilontinyhuge	precision
resolution)r"  rs   )r  rM	  s   & r"   test_MachAr#TestNPMachineParameters.test_MachAr  s    H 	

65!r$   c                   \         P                  \         P                  \         P                  \         P                  .pRpV FP  pV P                  \        W#! ^4      4       V P                  \         P                  V4      pV P                  WB4       KR  	  V P                  \        4      ;_uu_ 4       p\        RR7      ! \        4      pV! R4       RRR4       RpV P                  V\        XP                  4      4       V P                  4       ;_uu_ 4        \        RR7      ! \        4      pV! \         P                   ! ^4      4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  Tr@  rI  Nz(Unknown attribute 'machar' of type finfo)r  rb	  rc	  r`	  r`  rf	  ra	  nexpnmantrm	  rn	  rk	  bits)r   r
  r7  r  r:  r"  r   r[	  rC  r   r   r   rD  rB  rE  r  r  )r  r	   rM	  rV	  hc_funcrH  r  r  s   &       r"   
test_finfo"TestNPMachineParameters.test_finfo  s   RZZr}}ENBJJueRU+22288R@GJJw&  {++v&|4E"I , 9c3v//01 ##%%&u-E"((1+ &% ,+ &%%s   4E3E*E'	*E;	c                x   \         P                  \         P                  \         P                  \         P                  \         P
                  \         P                  \         P                  \         P                  .pRpV FP  pV P                  \        W#! ^4      4       V P                  \         P                  V4      pV P                  WB4       KR  	  V P                  4       ;_uu_ 4        \        RR7      ! \        4      pV! \         P                  ! ^4      4       RRR4       R#   + '       g   i     R# ; i)r  Tr@  N)r  r`  rt	  )r   rK  r  r  r  rU  r	  r  r  r"  r   r[	  r  r   r7  )r  r	   rM	  rV	  ru	  r  s   &     r"   
test_iinfo"TestNPMachineParameters.test_iinfo  s    "((BHHbhh"))BII''BJJueRU+22288R@GJJw&  ##%%&u-E"**Q-  &%%%s   +3D((D9	zNeeds NumPy < 1.24c                   R p\         P                  ! RR7      ;_uu_ 4       p\         P                  ! R4       \         P                  ! RV\        R7       \        R 4      pV! 4        RRR4       V P                  \        X4      ^4       V P                  R\        V^ ,          4      4       R#   + '       g   i     LO; i)	z*.*`np.MachAr` is deprecated \(NumPy 1.22\)T)recordrJ  always)messagecategoryc                  @    \         P                  ! 4       P                  # r   )r   rr   r  r  r$   r"   <lambda>JTestNPMachineParameters.test_np_MachAr_deprecation_np122.<locals>.<lambda>  s    biikoor$   Nz`np.MachAr` is deprecated)
warningscatch_warningssimplefilterfilterwarningsr   r   r~  r8  rD  rB  )r  r  rX   r  s   &   r"    test_np_MachAr_deprecation_np1228TestNPMachineParameters.test_np_MachAr_deprecation_np122  s     <$$D11Q!!(+##Hc-DG-.AC 2 	Q#13qt9= 21s   AB00C 	r  N)r  rh  )r  r  r  r  rR	  r"  r[	  rC	  rE	  r   ro	  rv	  ry	  rD	  r   run_test_in_subprocessr	  r  r  r   s   @r"   rJ	  rJ	    s|     H
8 __]g-/FG" H"*! 02FG$$> % H>r$   rJ	  c                   &   a  ] tR tRt o R tRtV tR# )TestRegistryImportsi  c                    \        R 4      p\        V4      w  r#V P                  RVP                  4       4       V P                  RVP                  4       RV R2R7       R# )z
            import numba
            import numpy as np
            @numba.njit
            def foo():
                np.array([1 for _ in range(1)])
            foo()
            print("OK")
        s   OKr$   z
--ERROR--

rX  N)r   r   r~  strip)r  coderesulterrors   &   r"   test_unsafe_import_in_registry2TestRegistryImports.test_unsafe_import_in_registry  s[        *$//ekkm;ugR1HIr$   r  N)r  r  r  r  r	  r  r  r   s   @r"   r	  r	    s     J Jr$   r	  __main__rl  )Nr   r   )r(  r)  F)r%  rh  r  )r  )r  )r   N)NF)NTFN)NT)NN)fb)Nr  g-DT!@)Tr'  NNr  )r  rW  r  r	  	functoolsr   r   textwrapr   numpyr   r  r   r   r   
numba.corer	   numba.typedr
   r   numba.np.numpy_supportr   numba.core.errorsr   r   numba.core.configr   numba.core.utilsr   numba.np.extensionsr   numba.tests.supportr   r   r   r   r   r   r   r   r   rC	  r   r(   r,   r.   r6   r:   r?   rC   rE   rK   rN   rS   rY   r\   r_   rg   rj   rl   rp   rs   ru   rx   r{   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r  r  r  r   r"  r(  r*  r/  r3  r:  r7  r=  r?  rA  rG  rJ  rP  rS  rW  rY  r\  r^  ra  re  rg  rn  rp  rw  ry  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rJ	  r	  r  mainr  r$   r"   <module>r	     s+           # #  " 0 D ' ( ': : :
   /-,%(!./3"$-%.1+$$$)(!#$%(!#$%(' #,%-& jj '&""45 !)<+"*6'8"/N",-6(06(0~e(ox ~e(BL\>h \>~J( J( zMMO r$   