+
    :i                       ^ RI HtHt ^ RIt^ RIt^ RIt^ RI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Ht ^ RIHtHtHtHtHt RtR	tR
 tR tR tR t R t!R t"R t#RUR 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 t0R t1R t2R  t3R! t4R" t5R# t6R$ t7R% t8R& t9R' t:R( t;R) t<R* t=]P|                  RV^ 3R+ R, llt?RWR- lt@RWR. ltAR/ tBR0 tCR1 tDR2 tER3 tFR4 tGR5 tHR6 tIR7 tJR8 tKR9 tLR: tMR; tNR< tOR= tPR> tQR? tRR@ tSRA tTRB tURC tVRD tWRXRE ltXRXRF ltYRYRG ltZRYRH lt[RI t\RJ t]RK t^RL t_RM t`RN taRO tb ! RP RQ]]4      tc ! RR RS]4      td]eRT8X  d   ]P                  ! 4        R# R# )Z    )productcycleN)jitnjittypeof)types)TypingErrorNumbaValueError)as_dtypenumpy_version)TestCaseMemoryLeakMixin
needs_blasskip_if_numpy_2expected_failure_np2ztimedelta64[M]ztimedelta64[Y]c                 4    \         P                  ! WV4       R # Nnparoundarrdecimalsouts   &&&\/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_array_methods.pynp_around_arrayr          IIcS!    c                 .    \         P                  ! W4      # r   r   valr   s   &&r   np_around_binaryr"      s    99S##r   c                 .    \         P                  ! V 4      # r   r   r!   s   &r   np_around_unaryr%      s    99S>r   c                 4    \         P                  ! WV4       R # r   r   roundr   s   &&&r   np_round_arrayr)      s    HHSC r   c                 4    \         P                  ! WV4       R # r   )r   round_r   s   &&&r   np_round__arrayr,   !   r   r   c                 .    \         P                  ! W4      # r   r'   r    s   &&r   np_round_binaryr.   $   s    88C""r   c                 .    \         P                  ! V 4      # r   r'   r$   s   &r   np_round_unaryr0   '   s    88C=r   c                   Ve^   V P                   P                  R8X  dC   \        V P                  WP                  4       \        V P                  WP                  4       V# \
        P                  ! WV4      pVfv   R p\        V \        \
        P                  34      '       dE   \        V! V P                  VP                  4      V! V P                  VP                  4      4      pV# V! W4      pV# )z,
A slightly bugfixed version of np.round().
cc                 P    VR 8X  d   V ^ 8  d   \         P                  ! V4      ) # V# )        )r   abs)argress   &&r   fixup_signed_zero*_fixed_np_round.<locals>.fixup_signed_zero7   s$    #:#'FF3K<'Jr   )
dtypekind_fixed_np_roundrealimagr   r(   
isinstancecomplexcomplexfloating)r   r   r   r7   r8   s   &&&  r   r<   r<   *   s     399>>S0(HH5(HH5
hhsc*;
 #););<==/#((C/#((CE 
 (1
r   c                     V P                   # r   )Tr   s   &r   array_TrE   D   s    55Lr   c                 "    V P                  4       # r   )	transposerD   s   &r   array_transposerH   G   s    ==?r   c                 "    V P                  4       # r   )copyrD   s   &r   
array_copyrK   J   s    88:r   c                 .    \         P                  ! V 4      # r   )r   rJ   rD   s   &r   np_copyrM   M   s    773<r   c                 .    \         P                  ! V 4      # r   )r   asfortranarrayrD   s   &r   np_asfortranarrayrP   P   s    S!!r   c                 .    \         P                  ! V 4      # r   )r   ascontiguousarrayrD   s   &r   np_ascontiguousarrayrS   S   s    $$r   c                 $    V P                  V4      # r   viewr   newtypes   &&r   
array_viewrY   V       88Gr   c                 $    V P                  V4      # r   take)r   indicess   &&r   
array_taker_   Y   rZ   r   c                 &    V P                  WR 7      # axisr\   )r   r^   rc   s   &&&r   array_take_kwsrd   \   s    88G8''r   c                 .    \         P                  ! V 4      # r   r   arange)arg0s   &r   np_arange_1ri   _   s    99T?r   c                 .    \         P                  ! W4      # r   rf   )rh   arg1s   &&r   np_arange_2rl   b   s    99T  r   c                 0    \         P                  ! WV4      # r   rf   )rh   rk   arg2s   &&&r   np_arange_3ro   e   s    99T&&r   c                 0    \         P                  ! WW#4      # r   rf   )rh   rk   rn   arg3s   &&&&r   np_arange_4rr   h   s    99T,,r   c                 0    \         P                  ! WR 7      # )stoprf   )rh   ru   s   &&r   np_arange_1_stoprv   k       99T%%r   c                 0    \         P                  ! WR 7      # steprf   )rh   r{   s   &&r   np_arange_1_stepr|   n   rw   r   c                 0    \         P                  ! WR 7      # r:   rf   )rh   r:   s   &&r   np_arange_1_dtyper   q   s    99T''r   c                 2    \         P                  ! WVR 7      # ry   rf   )rh   rk   r{   s   &&&r   np_arange_2_stepr   t   s    99Td++r   c                 2    \         P                  ! WVR 7      # r~   rf   )rh   rk   r:   s   &&&r   np_arange_2_dtyper   w   s    99Tu--r   c                 0    \         P                  ! WR 7      # rt   rf   )startru   s   &&r   np_arange_start_stopr   z   s    99U&&r   c                 2    \         P                  ! WVR 7      # )ru   r{   rf   )r   ru   r{   s   &&&r   np_arange_start_stop_stepr   }   s    99UD11r   c                 2    \         P                  ! WW#R 7      # ))ru   r{   r:   rf   )r   ru   r{   r:   s   &&&&r   np_arange_start_stop_step_dtyper      s    99UD>>r   c                 $    V P                  V4      # r   )fill)r   r!   s   &&r   
array_fillr      s    88C=r   c                    a  V 3R  lpV# )c                 &   < V P                  S4      # r   rU   rW   s   &r   rY   #make_array_view.<locals>.array_view   s    xx  r    )rX   rY   s   f r   make_array_viewr      s    !r   c                 \    V R ,          P                  \        P                  4      ^ ,          # ):r      N)rV   r   float32rD   s   &r   array_sliced_viewr      s    s8==$Q''r   c                    a  V 3R  lpV# )c                 &   < V P                  S4      # r   )astyperW   s   &r   array_astype'make_array_astype.<locals>.array_astype   s    zz'""r   r   )rX   r   s   f r   make_array_astyper      s    #r   c                8    V ^8  d   QhR\         P                  /# )   r:   )r   r:   )formats   "r   __annotate__r      s     E EBHH Er   c                2    \         P                  ! WW#R7      # )z/
np.frombuffer() on a Python-allocated buffer.
r:   countoffsetr   
frombuffer)br:   r   r   s   &&&&r   np_frombufferr      s     ==uDDr   c                 P    \         P                  ! V \         P                  WR 7      # )r   )r   r   	complex64r   r   r   s   &&&r   np_frombuffer_dtyper      s    ==",,eKKr   c                 4    \         P                  ! V R WR7      # )r   r   r   r   s   &&&r   np_frombuffer_dtype_strr      s    ==+UJJr   c                z    \         P                  ! V \         P                  R7      p\         P                  ! V4      # )z.
np.frombuffer() on a Numba-allocated buffer.
r   )r   onesint32r   shaper   s   & r   np_frombuffer_allocatedr      s'     ''%rxx
(C==r   c                     \         P                  ! V \         P                  R 7      p\         P                  ! V\         P                  R 7      # r~   )r   r   r   r   r   r   s   & r   np_frombuffer_allocated_dtyper      s+    
''%rxx
(C==BLL11r   c                     WJ WJ3# r   r   ar   s   &&r   identity_usecaser      s    Faj!!r   c                 "    V P                  4       # r   )tobytesr   s   &r   array_tobytesr          99;r   c                 "    V P                  4       # r   )nonzeror   s   &r   array_nonzeror      r   r   c                 .    \         P                  ! V 4      # r   )r   r   r   s   &r   
np_nonzeror      s    ::a=r   c                 .    \         P                  ! V 4      # r   r   where)r2   s   &r   
np_where_1r      s    88A;r   c                 0    \         P                  ! WV4      # r   r   )r2   xys   &&&r   
np_where_3r      s    88A!r   c                 "    V P                  4       # r   )itemr   s   &r   
array_itemr          668Or   c                 (    V P                  V4       R # r   )itemset)r   vs   &&r   array_itemsetr      s    IIaLr   c                 "    V P                   ! V!  # r   sumr   argss   &*r   	array_sumr      s    55$<r   c                 &    V P                  VR 7      # ra   r   r   rc   s   &&r   array_sum_axis_kwsr      s    55d5r   c                 &    V P                  VR 7      # r~   r   )r   r:   s   &&r   array_sum_dtype_kwsr      s    55u5r   c                 &    V P                  W!R 7      # )rc   r:   r   )r   r:   rc   s   &&&r   array_sum_axis_dtype_kwsr      s    55d5((r   c                 $    V P                  W4      # r   r   )r   a1a2s   &&&r   array_sum_axis_dtype_posr      s    55=r   c                     \         P                  ! V ^R7      p\         P                  ! V ^4      p\         P                  ! W4      pV P                  ^R7      p\         P                  ! V RR7      pW#WEV3# )r   rb   )r   r   )r   rc   r   r   r2   des   &&     r   array_sum_const_multir      s\     	sA
sAA
sAQA
sAq=r   c                 &    V P                  RR7      # )   rb   r   r   r   s   &&r   array_sum_const_axis_neg_oner      s     55b5>r   c                 "    V P                   ! V!  # r   cumsumr   s   &*r   array_cumsumr      s    88T?r   c                 &    V P                  VR 7      # ra   r   r   s   &&r   array_cumsum_kwsr      s    888r   c                 .    \         P                  ! V 4      # r   )r   r=   r   s   &r   
array_realr          771:r   c                 .    \         P                  ! V 4      # r   )r   r>   r   s   &r   
array_imagr      r   r   c                 0    \         P                  ! WV4      # r   r   clipr   a_mina_maxs   &&&r   np_clip_no_outr     s    771U##r   c                 0    \         P                  ! WW#4      # r   r   r   r   r  r   s   &&&&r   np_clipr     s    771U((r   c                 2    \         P                  ! WW#R 7      # r   r   r  s   &&&&r   np_clip_kwargsr	     s    771U,,r   c                 &    V P                  WV4      # r   r   r  s   &&&&r   
array_clipr     s    66%$$r   c                 (    V P                  WVR 7      # r  r  r  s   &&&&r   array_clip_kwargsr     s    66%C6((r   c                 $    V P                  W4      # r   r  r   s   &&&r   array_clip_no_outr    s    66%r   c                 "    V P                  4       # r   )conjr   s   &r   
array_conjr    r   r   c                 "    V P                  4       # r   )	conjugater   s   &r   array_conjugater    s    ;;=r   c                 .    \         P                  ! V 4      # r   )r   uniquer   s   &r   	np_uniquer  
  s    99Q<r   c                 $    V P                  V4      # r   dotr   s   &&r   	array_dotr    s    558Or   c                 B    V P                  V4      P                  V4      # r   r  r   s   &&r   array_dot_chainr    s    558<<?r   c                 0    \         P                  ! WR 7      # r~   )r   r   )nr:   s   &&r   
array_ctorr"    s    771""r   c                   |  a a ] tR tRt oRtV 3R ltR tR tR tR t	R t
R	 t]R
 4       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]P6                  R 3R 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, t0R- t1R. t2R/ t3R0 t4R1 t5R2 t6R3 t7R4 t8R5 t9R6 t:R7 t;R8 t<R9 t=]R: 4       t>R; t?R< t@R= tAR> tBR? tCR@ tDRA tERB tFRC tGRD tHRE tIRF tJRG tKRH tLRI tMRJ tNRK tORL tPRM tQRN tRRO tSRP tTRQ tURR tVRS tW]XRT 4       tYRU tZRV t[RW t\RX t]RY t^RZ t_R[ t`R\taVtbV ;tc# )]TestArrayMethodsi  z9
Test various array methods and array-related functions.
c                ,   < \         \        V `  4        R # r   )superr$  setUp)self	__class__s   &r   r'  TestArrayMethods.setUp  s    +-r   c                   . ROpV Uu. uF  qDR,          NK  	  ppV Uu. uF  p\        V4      NK  	  pp\        P                  \        P                  \        P                  \        P
                  \        P                  3pW3VWU.pTp	\        Wx4       Fm  w  r\        V
\        P                  34      ! V	4      pR FA  pV F8  pV^ 8  d
   V^
,          p\        W4      pV! W4      pV P                  VV4       K:  	  KC  	  Ko  	  Tp	\        Wx4       FE  w  r\        V
34      ! V	4      pV F(  p\        V4      pV! V4      pV P                  VV4       K*  	  KG  	  R# u upi u upi )      @Ng      g      g      g            ?g      @      @g      @      ?      )r   r   r   )intr   float64r   r   r   
complex128zipr   r<   assertPreciseEqual)r(  unary_pyfuncbinary_pyfuncbase_valuesr   complex_values
int_valuesargtypes	argvaluespyfunctyvaluescfuncr   r   expectedgots   &&&              r   check_round_scalar#TestArrayMethods.check_round_scalar  sD   E0;<1v,,<&12kc!fk
2MM5==%++OOU%5%57 z#5	 h2JB"ekk*+F3E&A!|R.q;H,C++C:   ' 3 h2JB"K'E*1-Ah''X6  3' =2s
   EE#c                :    V P                  \        \        4       R # r   )rC  r0   r.   r(  s   &r   test_round_scalar"TestArrayMethods.test_round_scalar;  s    @r   c                :    V P                  \        \        4       R # r   )rC  r%   r"   rF  s   &r   test_around_scalar#TestArrayMethods.test_around_scalar>  s    1ABr   c                (  a aa V 3R  loVV3R lp\         P                  ! . RO4      p\        P                  \        P                  3pV! WDV4       \        P
                  \        P                  3pV! WDVR,          4       S P                  4        R# )c                 <  < VP                  \        V4      4      p\        P                  ! V4      P                  \        V4      4      pVP	                  4       p\        WTV4       S	P                  4        V ! WTV4       S	P                  4        \        P                  P                  Wg4       S	P                  \        4      ;_uu_ 4       pV ! WTVR ,          4       RRR4       S	P                  \        XP                  4      R4       R#   + '       g   i     L7; i):r   NNNzinvalid output shape)r   r   r   
zeros_likerJ   r<   memory_leak_setupmemory_leak_teardowntestingassert_allcloseassertRaises
ValueErrorassertEqualstr	exception)
r@  r?  intyouttyr   r   r   pyoutraisesr(  s
   &&&&&    r   check_round7TestArrayMethods.check_round_array.<locals>.check_roundB  s    --/C--$++HUO<CHHJEC51""$#%%%'JJ&&s2"":..&cSW- /S!1!1235 /.s   DD	c                 ^  < \        W4       F  w  r4\        P                  ! V^R4      \        P                  \        P                  ! V^R4      3p\	        V4      ! S4      pS! WbW4^ 4       S! WbW4^4       \        V\        P                  4      '       g   S! Wb^
,          W4R4       K  K  	  R# )r   ANr   )r   r   Arrayr   r   r?   Integer)	r;  outtypesr?  rX  rY  argtysr@  r\  r=  s	   &&&    r   check_types7TestArrayMethods.check_round_array.<locals>.check_typesR  s    &x:++dAs3U[[++eQ46VV,E4:E4:!%77{DD   ;r   Nr-  r0  )r   arrayr   r2  r   r   r3  disable_leak_check)r(  r=  rd  r?  r;  r\  s   ff   @r   check_round_array"TestArrayMethods.check_round_arrayA  sk    	5 	 IJMM5==1H/OOU%5%56H&(9: 	!r   c                0    V P                  \        4       R # r   )rh  r)   rF  s   &r   test_round_array!TestArrayMethods.test_round_arrayk  s    ~.r   c                0    V P                  \        4       R # r   )rh  r   rF  s   &r   test_around_array"TestArrayMethods.test_around_arrayn  s    /r   c                0    V P                  \        4       R # r   )rh  r,   rF  s   &r   test_round__array"TestArrayMethods.test_round__arrayq  s    /r   c                    \         \        3 FF  p\        R R7      ! V4      pRpV P                  \        V4      ;_uu_ 4        V! R4       RRR4       KH  	  R#   + '       g   i     K]  ; iTnopython'.*The argument "a" must be array-like.*N)r0   r%   r   assertRaisesRegexr	   r(  r=  r@  msgs   &   r   test_around_bad_array&TestArrayMethods.test_around_bad_arrayu  sS    %7F&v.E;C''S99d :9 8 :99s   	AA*c           	     $   \         \        .p\        R8  d   VP                  \        4       V FI  p\        RR7      ! V4      pRpV P                  \        V4      ;_uu_ 4        V! ^^ ^R7       RRR4       KK  	  R#   + '       g   i     K`  ; i)r   Tru  9.*The argument "out" must be an array if it is provided.*r  Nr   r   )r)   r   r   appendr,   r   rx  r	   )r(  funcspy_funcr@  rz  s   &    r   test_around_bad_out$TestArrayMethods.test_around_bad_out|  sq    16!LL)G&w/EMC''S99a" :9  :99s   $A>>Bc                 
  a a R  oVV 3R lpVV 3R lpVV 3R lpVV 3R lpVV 3R lpVV 3R lp\         P                  ! R\         P                  3R\         P                  3.4      p\         P                  ! R	\         P                  3R
\         P                  3.4      p\         P                  ! R\         P                  3R\         P                  3.4      p	\        R8  d
   Tp
TpTpTpMTp
TpTpTp\         P
                  ! ^\         P                  R7      pV! V\         P                  ! R4      4       V! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! W4       V! W4       V
! V\         P                  4       VP                  R4      pV! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! W4       V
! W4       V
! V\         P                  4       \         P
                  ! ^\         P                  R7      P                  R4      P                  p\         P                  ! R4      P                  R,          p\        R8  d   TpMTpV! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! W4       V! W4       V! V\         P                  4       V! V\         P                  4       \         P
                  ! ^\         P                  R7      R,          pV! V\         P                  4       V! V\         P                  4       V! W4       V! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! W4       V! W4       \         P                   ! ^*.\         P                  R7      P                  R4      pV! V\         P                  4       V! V\         P                  4       V! W4       V! V\         P                  4       V! V\         P                  4       V! V\         P                  4       V! W4       V! W4       \         P                   ! R.4      pV! V\         P                  4       S P#                  4        R# )c                 :    \        V4      p\        V4      ! V 4      # r   )r   r   r   r:   r=  s   && r   run-TestArrayMethods.test_array_view.<locals>.run  s    $U+F<$$r   c                    < V P                  V4      pSP                  4        S! W4      pSP                  W24       ?SP                  4        R # r   )rV   rO  r5  rP  r   r:   rA  rB  r  r(  s   &&  r   check/TestArrayMethods.test_array_view.<locals>.check  sB    xxH""$c/C##C2%%'r   c                    < SP                  \        4      ;_uu_ 4       pS! W4       R R R 4       SP                  \        XP                  4      R4       R #   + '       g   i     L7; i)Nz"new type not compatible with array)rS  rT  rU  rV  rW  )r   r:   r[  r  r(  s   && r   	check_err3TestArrayMethods.test_array_view.<locals>.check_err  sJ    "":..&C /S!1!12AC /.   	AA'	c                   < R pSP                  \        4      ;_uu_ 4       p\        V4      ! V 4       RRR4       SP                  \	        XP
                  4      V4       SP                  \        4      ;_uu_ 4       pS! W4       RRR4       SP                  \	        VP
                  4      V4       R#   + '       g   i     L; i  + '       g   i     LJ; i)zJTo change to a dtype of a different size, the last axis must be contiguousNrS  rT  r   rU  rV  rW  r   r:   rz  r[  r  r(  s   &&  r   check_err_noncontig_last_axisGTestArrayMethods.test_array_view.<locals>.check_err_noncontig_last_axis  s    (C"":..&&s+ /S!1!12C8"":..&C /S!1!12C8 /. /.   B5=	C5C	C	c                   < R pSP                  \        4      ;_uu_ 4       p\        V4      ! V 4       RRR4       SP                  \	        XP
                  4      V4       SP                  \        4      ;_uu_ 4       pS! W4       RRR4       SP                  \	        VP
                  4      V4       R#   + '       g   i     L; i  + '       g   i     LJ; i)zOChanging the dtype of a 0d array is only supported if the itemsize is unchangedNr  r  s   &&  r   check_err_0d6TestArrayMethods.test_array_view.<locals>.check_err_0d  s    2C"":..&&s+ /S!1!12C8"":..&C /S!1!12C8 /. /.r  c                   < R pSP                  \        4      ;_uu_ 4       p\        V4      ! V 4       RRR4       SP                  \	        XP
                  4      V4       SP                  \        4      ;_uu_ 4       pS! W4       RRR4       SP                  \	        VP
                  4      V4       R#   + '       g   i     L; i  + '       g   i     LJ; i)zZWhen changing to a smaller dtype, its size must be a divisor of the size of original dtypeNr  r  s   &&  r   check_err_smaller_dtypeATestArrayMethods.test_array_view.<locals>.check_err_smaller_dtype  s    ;C"":..&&s+ /S!1!12C8"":..&C /S!1!12C8 /. /.r  c                   < R pSP                  \        4      ;_uu_ 4       p\        V4      ! V 4       RRR4       SP                  \	        XP
                  4      V4       SP                  \        4      ;_uu_ 4       pS! W4       RRR4       SP                  \	        VP
                  4      V4       R#   + '       g   i     L; i  + '       g   i     LJ; i)zuWhen changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.Nr  r  s   &&  r   check_err_larger_dtype@TestArrayMethods.test_array_view.<locals>.check_err_larger_dtype  s    #C "":..&&s+ /S!1!12C8"":..&C /S!1!12C8 /. /.r  r   r   ur   r   r   r   int16NNr   abcdefN)r            r   r   )r  r  r   )r   r:   int8r  r   rg   r   r   r3  reshaperC   zerosuint64r   uint32int64rf  rg  )r(  r  r  r  r  r  r  dt1dt2dt3check_error_larger_dtcheck_error_smaller_dtcheck_error_noncontigcheck_error_0dr   f_arrnot_f_or_c_arrcheck_maybe_errorr  s   f                 @r   test_array_view TestArrayMethods.test_array_view  s~   	%	(	C
	9
	9
	9	9 hhbggbgg78hhbhh#rww89hhbhh#rxx9:
 G#$:!%<"$A!)N$-!%."$-!&N ii"''*c288G$%c288c277c2::c2<< ccc2==1 kk&!c277c2::c2<< cc'c2==1 		"BGG,44V<>>&)++H5 G# = %eRWWnbii(%,%.%%e)eR]]3nbgg6 ii"((+C0c299c2::cc277+c288,c288,c'c' hht288,44R8c299c2::csBGG$sBHH%sBHH%s s  hhz"sBMM2 	!r   c                0   \         p\        \        P                  R,          34      ! V4      p\        P
                  ! R^.\        P                  R7      pVP                  \        P                  4      pV! V4      pV! V4      pV P                  WV4       R# )zH
Test .view() on A layout array but has contiguous innermost dimension.
NNNr.  r   N)	r   r   r   uint8r   rf  r   rV   rU  )r(  r=  r@  origbytearyexpectrB  s   &      r   test_array_sliced_view'TestArrayMethods.test_array_sliced_view$  sm     #ekk!n&'/xxa

3))BHH%Gn%r   c                
  a a R  oVV 3R lp\         P                  ! ^\         P                  R7      pV! V\         P                  ! R4      4       V! V\         P                  4       V! V\         P
                  4       V! V\         P                  4       V! VR4       \         P                  ! ^\         P                  R7      P                  R4      P                  pV! V\         P
                  4       \         P                  ! ^\         P                  R7      R,          pV! V\         P                  4       \         P                  ! ^\         P                  R7      pRVP                  n        V! V\         P                  4       \         P                  ! R\         P                  3.4      pS P                  4       ;_uu_ 4       pV! W#4       RRR4       S P                  R	\        XP                  4      4       RpS P                  4       ;_uu_ 4       p\!        R
R7      R 4       pV! V4       RRR4       S P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)c                 :    \        V4      p\        V4      ! V 4      # r   )r   r   r  s   && r   r  /TestArrayMethods.test_array_astype.<locals>.run5  s    &u-F<$$r   c                 |   < V P                  V4      P                  R R7      pS! W4      pSP                  W24       R# )r_  orderN)r   rJ   r5  r  s   &&  r   r  1TestArrayMethods.test_array_astype.<locals>.check9  s6    zz%(--C-8Hc/C##C2r   r   r  r   r  Fr   Nz#cannot convert from int32 to RecordTru  c                 R    \         P                  ! ^.4      P                  V 4       R# r   N)r   rf  r   r   s   &r   foo/TestArrayMethods.test_array_astype.<locals>.foo\  s    !$$U+r   z5array.astype if dtype is a string it must be constantr  )r   rg   r  r:   r   r   r3  r  rC   r  flags	writeableassertTypingErrorassertInrV  rW  r   )r(  r  r   dtr[  unicode_valr  r  s   f      @r   test_array_astype"TestArrayMethods.test_array_astype3  s   	%	3 ii"''*c288G$%c288c2::c2==!c9 ii"''*226:<<c2:: ii"((+C0c299 ii"((+#		c288 XXRWW~&'##%%#N &;&**+	-  ##%%$,  ,	 &
 	M&**+	- &% &%s   	II2I/	2J	c                6    V P                  \        R  R7       R# )c                 v    \         P                  ! V \         P                  R 7      P                  P                  # r~   )r   r   r  ctypesdatar   s   &r   <lambda>5TestArrayMethods.test_array_tobytes.<locals>.<lambda>f  s    q!A!H!H!M!Mr   )
memoryaddrN)check_layout_dependent_funcr   rF  s   &r   test_array_tobytes#TestArrayMethods.test_array_tobytesc  s    ((M 	) 	
r   c                >  a aa \        S4      oVVV 3R  lp\        \        ^4      4      pV! V4       V! \        V4      4       V! \	        V4      4       V! \
        P                  ! ^4      4       \
        P                  ! ^4      P                  R4      pV! V4       S P                  4        S P                  \        4      ;_uu_ 4       pS! \        R4      4       RRR4       S P                  R\        XP                  4      4       R#   + '       g   i     L7; i)c                   < \         P                  ! V 4      pS! V 4      pSP                  4        S! V 4      pSP                  W24       ?\        P
                  ! 4        SP                  \         P                  ! V 4      V^,           4       ?\        P
                  ! 4        SP                  \         P                  ! V 4      V4       SP                  4        R# r  )sysgetrefcountrO  r5  gccollectrU  rP  )buf
old_refcntrA  rB  r@  r=  r(  s   &   r   r  3TestArrayMethods.check_np_frombuffer.<locals>.checkm  s    -Jc{H""$*C##C2 JJLS__S1:>BJJLS__S1:>%%'r   s   xxxNz.buffer size must be a multiple of element size)r  r   )r   	bytearrayrangebytes
memoryviewr   rg   r  rg  rS  rT  rU  rV  rW  )r(  r=  r  r   r[  r@  s   ff   @r   check_np_frombuffer$TestArrayMethods.check_np_frombufferi  s    V	(  eBi aeAhjmbiimIIbM!!&)a 	!z**f)F#$ +IV--.	0 +*s   DD	c                0    V P                  \        4       R # r   )r  r   rF  s   &r   test_np_frombuffer#TestArrayMethods.test_np_frombuffer  s      /r   c                0    V P                  \        4       R # r   )r  r   rF  s   &r   test_np_frombuffer_dtype)TestArrayMethods.test_np_frombuffer_dtype  s      !45r   c                0    V P                  \        4       R # r   )r  r   rF  s   &r   test_np_frombuffer_dtype_str-TestArrayMethods.test_np_frombuffer_dtype_str  s      !89r   c           	     "   \        R R7      R 4       pV P                  \        4      ;_uu_ 4       pV! \        \	        ^4      4      R4       RRR4       \        XP                  4      pRpV P                  WC4       R#   + '       g   i     L:; i)Tru  c                 4    \         P                  ! WR 7       R# )r   Nr   )r  r  s   &&r   funcETestArrayMethods.test_np_frombuffer_dtype_non_const_str.<locals>.func  s    MM#(r   r   Nz@If np.frombuffer dtype is a string it must be a string constant.)r   rS  r	   r  r  rV  rW  r  )r(  r  r[  excstrrz  s   &    r   &test_np_frombuffer_dtype_non_const_str7TestArrayMethods.test_np_frombuffer_dtype_non_const_str  st    	d		) 
	) {++v59%w/ , V%%&"c" ,+s   A>>B	c                    \        R R7      R 4       pRpV P                  \        V4      ;_uu_ 4       pV! R4       RRR4       R#   + '       g   i     R# ; i)Tru  c                 .    \         P                  ! V 4      # r   r   )r  s   &r   r  <TestArrayMethods.test_np_frombuffer_bad_buffer.<locals>.func  s    ==%%r   z).*Argument "buffer" must be buffer-like.*N)r   rx  r	   )r(  r  rz  r[  s   &   r   test_np_frombuffer_bad_buffer.TestArrayMethods.test_np_frombuffer_bad_buffer  sK    	d		& 
	& :##K55J 6555s   	AA	c                .    V P                   P                  # r   )r  r  r  s   &r   r  TestArrayMethods.<lambda>  s    !((--r   c                  a aa VVV 3R  lpV! ^4      pV! V4       V! VP                  R4      4       V! VP                  R4      P                  4       V! VP                  R4      R,          4       V! VP                  R4      4       V! VP                  R4      P                  4       V! VP                  R4      R,          4       \        P                  ! ^ .4      P                  R4      pV! V4       R# )c                   < \        \        V 4      34      ! S4      pS! V 4      pV! V 4      pSP                  W#4       SP                  V P                  P
                  S! V4      8H  V P                  P
                  S! V4      8H  4       R # r   )r   r   r5  rU  r  r  )r   r@  rA  rB  r  r=  r(  s   &   r   	check_arr?TestArrayMethods.check_layout_dependent_func.<locals>.check_arr  so    &+(0Ec{H*C##H2

:h#77

:c?2r   r  Nr  r   r  r   r   )r  rC   r   rf  )r(  r=  facr  r
  r   s   ff&f  r   r  ,TestArrayMethods.check_layout_dependent_func  s    	 "g##++f%&#++f%''(#++f%c*+#++i()#++i(**+#++i(-.hhsm##B'#r   c                0    V P                  \        4       R # r   )r  rH   rF  s   &r   test_array_transpose%TestArrayMethods.test_array_transpose  s    ((9r   c                0    V P                  \        4       R # r   )r  rE   rF  s   &r   test_array_TTestArrayMethods.test_array_T  s    ((1r   c                0    V P                  \        4       R # r   )r  rK   rF  s   &r   test_array_copy TestArrayMethods.test_array_copy  s    ((4r   c                   a a VV 3R  lpV! R4       V! . RO4       V! ^4       RpS P                  \        V4      ;_uu_ 4       p\        \        R4      34      ! S4       RRR4       R#   + '       g   i     R# ; i)c                    < \        \        V 4      34      ! S4      pS! V 4      pV! V 4      pSP                  W#4       R # r   r   r   r5  )objr@  rA  rB  r=  r(  s   &   r   	check_obj5TestArrayMethods.check_object_copy.<locals>.check_obj  s8    &+(0Ec{H*C##H2r   rw  helloNr   r   r  )      ?       @r,  rx  r	   r   r   )r(  r=  r  rz  r[  s   ff   r   check_object_copy"TestArrayMethods.check_object_copy  s^    	3 	)/"!7##K55&/$%f- 6555s   A**A;	c                Z    V P                  \        4       V P                  \        4       R # r   )r  rM   r#  rF  s   &r   test_np_copyTestArrayMethods.test_np_copy  s    ((1w'r   c                   a a VV 3R  lp^*RR\         P                  ! ^*4      \         P                  ! ^*4      R3 F  pV! V4       K  	  R# )c                    < \        \        V 4      34      ! S4      pS! V 4      pV! V 4      pSP                  W#4       R # r   r  )r   r@  rA  rB  r=  r(  s   &   r   check_scalarETestArrayMethods.check_ascontiguousarray_scalar.<locals>.check_scalar  s8    &)&v.EayH(C##H2r   g      E@y              E@TN)r   r   r2  )r(  r=  r*  r   s   ff  r   check_ascontiguousarray_scalar/TestArrayMethods.check_ascontiguousarray_scalar  s9    	3
 dCBBFAO Gr   c                    R pV P                  \        V4      ;_uu_ 4       p\        \        R4      34      ! V4       RRR4       R#   + '       g   i     R# ; i)rw  r  Nr"  )r(  r=  rz  r[  s   &&  r   check_bad_array TestArrayMethods.check_bad_array  s?    7##K55&/$%f- 6555s   AA	c                    V P                  \        4       V P                  \        4       V P                  \        4       R # r   )r  rP   r/  r,  rF  s   &r   test_np_asfortranarray'TestArrayMethods.test_np_asfortranarray  s/    (():;./++,=>r   c                  a aa \         o\        S4      oRVVV 3R llpV! \        P                  ! \        P                  ! ^4      R	4      RR7       V! \        P
                  ! ^^.^^.^^..RR7      4       V! \        P
                  ! ^^.^^.^^..RR7      4       V! \        P
                  ! . R
ORR7      4       R# )Tc                    < V'       d   R V P                   n        S! V 4      pS! V 4      pSP                  W#4       SP                  VP                   P                  VP                   P                  4       R# FNr  r  r5  rU  r   set_readonlyrA  rB  r@  r=  r(  s   &&  r   r  ?TestArrayMethods.test_np_asfortranarray_readonly.<locals>.check  V    &+		#c{H*C##H2SYY00(..2J2JKr   Fr9  Fr  CNT   r   r   r   r  r   rA  )rP   r   r   broadcast_tor  rf  r(  r  r@  r=  s   f @@r   test_np_asfortranarray_readonly0TestArrayMethods.test_np_asfortranarray_readonly  s    "V	L 	L 	boobhhqk62GbhhAAA/s;<bhhAAA/s;<bhhc23r   c                    V P                  \        4       V P                  \        4       V P	                  \        4       R # r   )r  rS   r/  rP   r,  rF  s   &r   test_np_ascontiguousarray*TestArrayMethods.test_np_ascontiguousarray	  s/    (()=>./++,@Ar   c                  a aa \         o\        S4      oRVVV 3R llpV! \        P                  ! \        P                  ! ^4      R	4      P
                  RR7       V! \        P                  ! ^^.^^.^^..RR7      4       V! \        P                  ! ^^.^^.^^..RR7      4       V! \        P                  ! . R
ORR7      4       R# )Tc                    < V'       d   R V P                   n        S! V 4      pS! V 4      pSP                  W#4       SP                  VP                   P                  VP                   P                  4       R# r6  r7  r8  s   &&  r   r  BTestArrayMethods.test_np_ascontiguousarray_readonly.<locals>.check  r;  r   Fr<  r>  r  r=  Nr?  r@  rB  )rS   r   r   rC  r  rC   rf  rD  s   f @@r   "test_np_ascontiguousarray_readonly3TestArrayMethods.test_np_ascontiguousarray_readonly  s    %V	L 	L 	boobhhqk62445IbhhAAA/s;<bhhAAA/s;<bhhc23r   c                b   a aa \        S4      oVVV 3R  lpV! R4       V! R4       V! R4       R# )c                 J   < S! V 4      pS! V 4      pSP                  W!4       R # r   r5  )r   rA  rB  r@  r=  r(  s   &  r   r  =TestArrayMethods.check_np_frombuffer_allocated.<locals>.check(  s#    e}H,C##C2r   N)   r  r   r   r   )r   )r(  r=  r  r@  s   ff @r   check_np_frombuffer_allocated.TestArrayMethods.check_np_frombuffer_allocated$  s)    V	3
 	efir   c                0    V P                  \        4       R # r   )rU  r   rF  s   &r   test_np_frombuffer_allocated-TestArrayMethods.test_np_frombuffer_allocated1  s    **+BCr   c                0    V P                  \        4       R # r   )rU  r   rF  s   &r   test_np_frombuffer_allocated2.TestArrayMethods.test_np_frombuffer_allocated24  s    **+HIr   c                  a a R  pVV 3R lp\         P                  ! . RO4      pV! V4       \         P                  ! . R	O4      pV! V4       V! ^4      pV! V4       V! VP                  R
4      4       V! VP                  R
4      P                  4       V! VP                  R
4      R,          4       V! VP                  R4      4       V! VP                  R4      P                  4       V! VP                  R4      R,          4       \         P
                  ! . RO4      pV! V4       RR\        R4      3 F  p\         P
                  ! V.4      P                  R4      p\        R8  d   V! V4       K>  S P                  \        \        34      ;_uu_ 4       p\        \        V4      34      ! S4       RRR4       RpS P                  V\        XP                  4      4       K  	  R#   + '       g   i     L=; i)c                     \         P                  P                  ^*4       \         P                  P                  V 4      pRWR8  &   \        R4      WR8  &   V# *   r4   g333333?nangffffff?r   randomseedfloatNr   s   & r   r  +TestArrayMethods.check_nonzero.<locals>.fac8  E    IINN2))""1%C Cc	N"5\Cc	NJr   c                    < \        \        V 4      34      ! S4      pS! V 4      pV Uu. uF  q3P                  4       NK  	  ppSP                  V! V 4      V4       R # u upi r   )r   r   rJ   r5  )r   r@  rA  r   r=  r(  s   &   r   r
  1TestArrayMethods.check_nonzero.<locals>.check_arr?  sR    &+(0Ec{H*23(Q(H3##E#J9 4s   Ar  r4   r.  ra  NzYCalling nonzero on 0d arrays is not allowed. Use np.atleast_1d(scalar).nonzero() instead.r   r   r   r   rT  r  r  )Hello worldr   )r   r   )r   r  bool_r  rC   rf  re  r   rS  rT  r	   r   r   r  rV  rW  )r(  r=  r  r
  r   r   r[  rz  s   ff      r   check_nonzeroTestArrayMethods.check_nonzero7  su   		: hh}%#hhy!#"g##++f%&#++f%''(#++f%c*+#++i()#++i(**+#++i(-.hh-.#sE%L)A((A3-''+Cv%#&&
K'@AAV&+(0 BAc3v'7'7#89 *
 BAs   G))G9c                0    V P                  \        4       R # r   )rq  r   rF  s   &r   test_array_nonzero#TestArrayMethods.test_array_nonzeroa  s    =)r   c                0    V P                  \        4       R # r   )rq  r   rF  s   &r   test_np_nonzero TestArrayMethods.test_np_nonzerod      :&r   c                0    V P                  \        4       R # r   )rq  r   rF  s   &r   test_np_where_1 TestArrayMethods.test_np_where_1g  ry  r   c                  a aaa	 \         o	R  p\        . R
O4      o\        P                  \        P                  \        P
                  \        P                  \        P                  \        P                  .o\        P                  P                  ^*4       RVVV	V 3R llpVV	V 3R lp\        P                  ! . RO4      pV! V4       \        P                  ! . RO4      pV! V4       V! ^4      pV! V4       V! VP                  R4      4       V! VP                  R4      P                  4       V! VP                  R4      R,          4       V! VP                  R4      4       V! VP                  R4      P                  4       V! VP                  R4      R,          4       V! VP                  R4      RR7       V! VP                  R4      P                  RR7       V! VP                  R4      R,          RR7       RR\        R4      3 F1  p\        P                   ! V.4      P                  R4      pV! V4       K3  	  R F  pV! V4       K  	  R	# )c                     \         P                  P                  ^*4       \         P                  P                  V 4      pRWR8  &   \        R4      WR8  &   V# r_  rb  rf  s   & r   r  -TestArrayMethods.test_np_where_3.<locals>.facl  ri  r   r=  c                   < \         P                  P                  S4       VR 8w  dT   \         P                  ! V S^ ,          VR7      p\         P                  ! V S^,          VR7      pV P	                  VR7      p MR\         P                  ! V S^ ,          \        S4      R7      p\         P                  ! V S^,          \        S4      R7      pVP                  ^4       VP                  ^	4       \        \        V 4      \        V4      \        V4      34      ! S	4      pS	! WV4      pV! WV4      pS
P                  We4       R# )F)r:   r  r  N)
r   rc  shufflerN  rJ   nextr   r   r   r5  )r   layoutr   r   r@  rA  rB  _typeslayoutsr=  r(  s   &&     r   r
  3TestArrayMethods.test_np_where_3.<locals>.check_arry  s    IIf%MM#VAYfEMM#VAYfEhhVh,MM#VAYd7mLMM#VAYd7mLFF1IFF1I&+vay&)<=fEEca(H"C##C2r   c                 .  < ^p^p\         P                  P                  S4       S^ ,          ! ^4      pS^,          ! ^4      p\        \	        V 4      \	        V4      \	        V4      34      ! S4      pS! WV4      pV! WV4      pSP                  WT4       R# )r   N)r   rc  r  r   r   r5  )	scalr   r   r@  rA  rB  r  r=  r(  s	   &     r   
check_scal4TestArrayMethods.test_np_where_3.<locals>.check_scal  s    AAIIf%q	!Aq	!A&,q	6!9=>vFEdq)H#C##C2r   r  )r  r4   r.  ra  Nr>  r=  r_  Frl  rT  r  r  r   )r   r   TFr/  y                )r   r   r   r   r  r   r2  r   r3  rc  rd  r  rp  r  rC   re  rf  )
r(  r  r
  r  r   r   r   r  r  r=  s
   f      @@@r   test_np_where_3 TestArrayMethods.test_np_where_3j  s   	 (((BHHbjj"**bll--! 			r	3 	3 		3 hh}%#hhy!#"g##++f%&#++f%''(#++f%c*+#++i()#++i(**+#++i(-.#++i(5#++i(**37#++i(-c:sE%L)A((A3-''+CcN * .AqM .r   c                   a aa \         o\        R R7      ! S4      oVVV 3R lpV 3R lpV! 4        FA  pV^ 8  ^ ^3pV! V4       V^ 8  \        P                  R3pV! V4       V^8  R R3pV! V4       KC  	  R# )Tru  c                 B   < S! V !  pS! V !  pSP                  W!4       R # r   rQ  )r   rA  rB  r@  r=  r(  s   &  r   check_okGTestArrayMethods.test_np_where_3_broadcast_x_y_scalar.<locals>.check_ok  s#    t}H,C##C2r   c               3     <"   \         P                  ! R^^4      p SP                  P                  V 4       V x  V P	                  ^^^4      x  V P	                  ^^RR7      x  V P	                  ^^^4      RRR1,          x  R# 5i)r   r=  r  Nr   )r   linspacerc  r  r  )r   r(  s    r   a_variationsKTestArrayMethods.test_np_where_3_broadcast_x_y_scalar.<locals>.a_variations  ss     B2&AKK"G))Aq!$$))Aq),,))Aq!$TrT**s   BBFNy      ?      @)r   r   r   ra  )r(  r  r  r   paramsr@  r=  s   f    @@r   $test_np_where_3_broadcast_x_y_scalar5TestArrayMethods.test_np_where_3_broadcast_x_y_scalar  sz    T"6*	3
	+ A!eQ]FV!eRVVV,FV!eT5)FV  r   c                   a a	a
 \         o
\        R R7      ! S
4      o	V	V
V 3R lpR pR pV! 4        F7  pV! 4        F)  p\        P                  ! V4      pWF8  pWtV3pV! V4       K+  	  K9  	  R# )Tru  c                    < V w  rpS! WV4      pS! WV4      pSP                  WT4       S! WV4      pS! WV4      pSP                  WT4       R # r   rQ  )	r   	conditionr   r   rA  rB  r@  r=  r(  s	   &     r   r  JTestArrayMethods.test_np_where_3_broadcast_x_or_y_scalar.<locals>.check_ok  sZ    "OI!iA.H	a(C##C2 iA.H	a(C##C2r   c               3   (  "   \         P                  ! ^	4      P                  ^^4      p V x  V R,          x  \         P                  ! V 4      x  V RRR1,          x  \         P                  ! R^
^<4      P                  ^^^4      R,          x  R# 5i)	   g?N              ?r   )r   rg   r  rO   r  r  s    r   array_permutationsTTestArrayMethods.test_np_where_3_broadcast_x_or_y_scalar.<locals>.array_permutations  sr     		!$$Q*AGc'M##A&&DbD'M++c2r*221a;b@@s   BBc               3   R   "   ^ x  Rx  \         P                  x  Rx  Rx  R# 5i)r   g333333@TNy       @      @)r   ra  r   r   r   scalar_permutationsUTestArrayMethods.test_np_where_3_broadcast_x_or_y_scalar.<locals>.scalar_permutations  s"     GI&&LJLs   %'N)r   r   r   mean)r(  r  r  r  r   r   x_meanr  r  r@  r=  s   f        @@r   'test_np_where_3_broadcast_x_or_y_scalar8TestArrayMethods.test_np_where_3_broadcast_x_or_y_scalar  si    T"6*
	3	A	 $%A(*J	#* 	 + &r   c                	   \         p\        R R7      ! V4      p\        \        P                  \        P
                  \        P                  \        P                  \        P                  .pV EF  p\        P                  ! ^5\        R7      p\        P                  P                  V! WT! ^ 4      V! ^4      4      V! ^ 4      4       \        P                  P                  V! V( V! ^ 4      V! ^4      4      V! ^4      4       \        P                  P                  V! R V! ^ 4      V! ^4      4      V! ^ 4      4       \        P                  P                  V! RV! ^ 4      V! ^4      4      V! ^4      4       \        P                  ! V4      P                  V4      p\        P                  ! V4      pVP                  V4      pRV^&   V^,          V^&   \        P                  P                  V! WWV4      V4       \        P                  P                  V! WVV4      V4       \        P                  P                  V! WVV^ ,          4      V4       \        P                  P                  V! WV^ ,          V4      V4       \        P                  P                  V! VR,          VR,          VR,          4      VR,          4       \        P                  P                  V! VR,          VR,          VR,          4      VR,          4       \        P                  P                  V! VR,          VR,          VR,          4      VR,          4       \        P                  P                  V! VR,          VR,          VR,          4      VR,          4       \        P                  P                  V! VRRR	1,          VRRR	1,          VRRR	1,          4      VRRR	1,          4       \        P                  P                  V! VRRR
1,          VRRR
1,          VRRR
1,          4      VRRR
1,          4       \        P                  P                  V! V^RR
1,          V^RR
1,          V^RR
1,          4      V^RR
1,          4       EK  	  R# )Tru  r   Fr  :r   Nr   :NNr  :r   Nr  Nr  )r   r   boolr   r  r   r  doubler3  r   rQ  assert_equal	ones_liker   rN  )	r(  r=  r@  dtsr  r2   r   r   rs	   &        r   test_np_where_numpy_basic*TestArrayMethods.test_np_where_numpy_basic  s,   T"6* RXXrxx299bmmLB$'AJJ##E1beRU$;RUCJJ##E1"beRU$;RUCJJ##E$1r!u$=r!uEJJ##E%A1$>1FQ&&r*Aa AAAaDQ4AaDJJ##E!NA6JJ##E!NA6JJ##E!!$5q9JJ##E!qT1$5q9JJ##E!C&!C&!C&$A1S6JJJ##E!D'1T7AdG$DagNJJ##E!C&!C&!C&$A1S6JJJ##E!D'1T7AdG$DagNJJ##E!DbD'1TrT7AddG$Da"gNJJ##E!DbD'1TrT7AddG$Da"gNJJ##E!AErE(AaeeHa2h$G15b5R+ r   c                   \         p\        R R7      ! V4      pR R.p\        P                  ! R4      p\        P                  ! R4      pV! \        P
                  ! V4      R\        P                  3,          WE4      p\        P                  P                  V^ ,          V^ ,          4       \        P                  P                  V^,          V^ ,          4       VP                  pVP                  pV! W4V4      p\        P                  P                  VR,          VR,          4       \        P                  P                  VR,          VR,          4       R# )Tru  Fr  N)r      )r  r   )r  r   )
r   r   r   r  r   rf  newaxisrQ  assert_array_equalrC   )r(  r=  r@  r2   r   r   r  s   &      r   test_np_where_numpy_ndim)TestArrayMethods.test_np_where_numpy_ndim  s    T"6*5MHHWGGG"((1+a

l+Q2


%%adAaD1


%%adAaD1CCCC!N


%%afaf5


%%afaf5r   c                >   \         p\        R R7      ! V4      p\        P                  ! . RO4      p\        P                  ! ^4      p\        P                  ! . RO\        P
                  R7      p\        P                  ! . RO\        P
                  R7      p\        P                  P                  V! W4V4      V4       VP                  \        P                  4      pVP                  \        P                  4      p\        P                  P                  V! W4V4      V4       VP                  \        4      pRW3^ 8g  &   \        P                  P                  V! W4V4      V4       V^ 8g  pRW3^ 8H  &   ^ W7&   \        P                  P                  V! W5V4      V4       R# )	Tru  r   i
iauN)FTFFFFTFFFTF)      @r4   r,  r!              r4         $      $@r   r4   r,  )r  r   r,  r!  r  r  r   r  r  r   r   r,  )r   r   r   rf  r  r2  rQ  r  r   r   r  r1  )r(  r=  r@  r2   r   r   r  tmpmasks   &       r   test_np_where_numpy_dtype_mix.TestArrayMethods.test_np_where_numpy_dtype_mix  s'   T"6*HH 0 1IIaLHHJJJ(HHJ::'


aA2HHRZZ HHRXX


aA2 HHSMq&	


aA2q&q&	



aA2r   c                   \         p\        R R7      ! V4      pR R .p\        P                  ! R4      p\        P                  ! R4      pV P	                  4        V P                  \        R4      ;_uu_ 4        V! W4V4       RRR4       V P                  \        R4      ;_uu_ 4        V! V^ ,          WE4       RRR4       R#   + '       g   i     LI; i  + '       g   i     R# ; i)Tru  zobjects cannot be broadcastN)r   rA  )rA  rA  )r   r   r   r   rg  rx  rT  )r(  r=  r@  r2   r   r   s   &     r   test_np_where_numpy_test_error/TestArrayMethods.test_np_where_numpy_test_error;  s    T"6*4LGGFOGGFO!##J0MNN!N O ##J0MNN!A$ ON ON ONNs   7
C'CC	C&	c                h   \         p\        R R7      ! V4      pRpV P                  \        V4      ;_uu_ 4        V! R^^4       RRR4       RpV P                  \        V4      ;_uu_ 4        V! ^R^4       RRR4       RpV P                  \        V4      ;_uu_ 4        V! ^^R4       RRR4       RpV P                  \        V4      ;_uu_ 4        V! ^RR4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lk; i  + '       g   i     R# ; i)	Tru  z+The argument "condition" must be array-likeNz/The argument "x" must be array-like if providedr  z/The argument "y" must be array-like if providedro  z"Argument "x" or "y" cannot be None)r   r   rx  r	   ry  s   &   r   test_np_where_invalid_inputs-TestArrayMethods.test_np_where_invalid_inputsK  s    T"6*;##K55$1 6 @##K55!Wa  6 @##K55!Q  6 3##K55!T4  65 65 65 65
 655s/   C',C:DD 'C7	:D
	D	 D1	c                  aa \         R  R 3pV Fr  o\        RR7      ! S4      oVV3R lpV! ^ 4       V! ^4       V! ^4       V! R4       V! R4       V! \        ^^4      4       V! \        P                  ! ^ 4      4       Kt  	  R# )c                 0    \         P                  ! V ^
4      # )
   rf   r  s   &r   r  4TestArrayMethods.test_arange_1_arg.<locals>.<lambda>d  s    bii2&r   c           	      X    \         P                  ! ^\        ^\        V 4      4      R7      # )   rz   )r   rg   maxr5   r  s   &r   r  r  e  s    biiAs1v7r   Tru  c                 f   < S! V 4      pS! V 4      p\         P                  P                  W4       R # r   r   rQ  rR  )rh   rA  rB  r@  r=  s   &  r   r  4TestArrayMethods.test_arange_1_arg.<locals>.check_okk  s'    !$<Dk

**89r   g      @Nr  )ri   r   r@   r   r  )r(  all_pyfuncsr  r@  r=  s   &  @@r   test_arange_1_arg"TestArrayMethods.test_arange_1_arg`  sx     &7
 "F&v.E:
 QKQKQKSMRLWQ]#RWWQZ  "r   c                   R  p\         \        \        \        R R 3pV F  p\	        RR7      ! V4      pV! R^W44       V! R	RW44       V! ^RW44       V! R^W44       V! ^RW44       \
        R
8  g   KT  V! \        ^^4      \        ^^4      W44       V! \        ^^4      \        ^^4      W44       K  	  \        p\	        RR7      ! V4      pV! ^\        P                  W44       V! R\        P                  W44       V! ^RW44       V! \        P                  ! ^ 4      RW44       \
        R
8  dG   V! ^
\        P                  W44       V! \        P                  ! ^
4      \        P                  W44       R# R# )c                 d    V! W4      pV! W4      p\         P                  P                  WE4       R # r   r  )rh   rk   r=  r@  rA  rB  s   &&&&  r   r  4TestArrayMethods.test_arange_2_arg.<locals>.check_oky  s(    d)H#CJJ&&x5r   c                 0    \         P                  ! W^4      # rA  rf   r   r   s   &&r   r  4TestArrayMethods.test_arange_2_arg.<locals>.<lambda>  s    1+r   c                 2    \         P                  ! ^WR7      # )r   rz   rf   r  s   &&r   r  r    s    1a0r   Tru        ?Nr!  r   r  )rl   r   rv   r|   r   r   r@   r   r   r   r   r  r3  r   )r(  r  r  r=  r@  s   &    r   test_arange_2_arg"TestArrayMethods.test_arange_2_argx  s=   	6  +0
 "F&v.ERF*RV+QV+S!V+Qf,v%A1vEA1vE " #T"6*BJJ.bhh.D&(T616!R6R\\"%r}}fD "r   c           	     d  a a \         P                  P                  R 4      ;'       d    \         P                  R8  oR	V V3R llp\        \
        \        3 EFx  p\        RR7      ! V4      pV! ^ ^^W#4       V! R
R^W#4       V! ^ RRW#4       V! R^^W#4       V! ^ ^RW#4       V! ^^RW#4       V! ^RRW#4       V! \        P                  ! ^ 4      \        P                  ! ^4      \        P                  ! ^4      W#4       V! \        P                  ! ^ 4      \        P                  ! ^4      \        P                  ! ^4      W#4       \        P                  pV! V! ^ 4      V! ^4      V! ^4      W#R4       V! \        P                  ! ^ 4      V! ^4      V! ^4      W#R4       \        R8  g   EKY  V! ^ \        ^^4      \        ^^4      W#4       EK{  	  \        p\        RR7      ! V4      pV! ^^\        P                   W#4       V! R^\        P                  W#4       V! ^^RW#4       V! \        P                  ! ^ 4      \        P                  ! ^4      RW#R4       \        R8  dI   V! R^
\        P"                  W#4       V! ^\        P$                  ! ^
4      \        P"                  W#4       R# R# )win32c                    < V! WV4      pV! WV4      p\         P                  P                  Wg4       S	'       g)   SP                  VP                  VP                  4       R # R # r   )r   rQ  rR  rU  r:   )
rh   rk   rn   r=  r@  check_dtyperA  rB  r(  	windows64s
   &&&&&&  r   r  4TestArrayMethods.test_arange_3_arg.<locals>.check_ok  sO    d$/HD)CJJ&&x5   ; r   Tru  r  皙?Nr!  l        r  r  r   r  r  r  )r  platform
startswithmaxsizero   r   r   r   r   r  r  r   r  r   r@   r   r   r3  r   )r(  r  r=  r@  i8r  s   f    @r   test_arange_3_arg"TestArrayMethods.test_arange_3_arg  s   LL++G4NNw9N		< 	< #$46OPF&v.EQ1f,RQ.QR/S!Q.Q3.Q4/QdF2RWWQZRWWQZGRWWQZ!bhhqk6IBRUBqE2a5&>RXXa["Q%AtDv%GAqM71a=&H# Q& #T"6*Arzz61a61AtV+RXXa[$tD6!RR]]F:QR("--G "r   c           	       aa \         \        3 F  o\        R R7      ! S4      oVV3R lpV! ^ ^^\        P                  4       V! RR^\        P
                  4       V! ^ RR	\        P                  4       V! R^^R4       V! ^^RR4       V! ^RRR4       \        R
8  g   K  V! ^ ^R\        P                  4       V! ^ \        ^^4      \        ^^4      \        P                  4       K  	  R# )Tru  c                 j   < S! WW#4      pS! WW#4      p\         P                  P                  WE4       R # r   r  )rh   rk   rn   rq   rA  rB  r@  r=  s   &&&&  r   r  4TestArrayMethods.test_arange_4_arg.<locals>.check_ok  s-    !$d9D3

**89r   r  Nr  r  r   r  r  r  )
rr   r   r   r   r2  r   r   r   r3  r@   )r(  r  r@  r=  s   & @@r   test_arange_4_arg"TestArrayMethods.test_arange_4_arg  s    "$CDF&v.E:
 Q1bjj)RQ)QR,S!Q%Q4&QdD)v%AsBMM2GAqM71a="--H! Er   c                   V P                  4        R  R R .pR R .pV FC  pV P                  \        4      ;_uu_ 4       p\        RR7      ! V4      pV! ^4       RRR4       KE  	  V FD  pV P                  \        4      ;_uu_ 4       p\        RR7      ! V4      pV! ^^4       RRR4       KF  	  \        p\        RR7      ! V4      pW53 F  p^\
        P                  ! ^4      ^ 3R
3 F  p\        \        3pV P                  V4      ;_uu_ 4       p\        P                  ! 4       ;_uu_ 4        \        P                  ! R4       V! V!   RRR4       V P                  R	\        VP                  4      4       RRR4       K  	  K  	  R#   + '       g   i     EK~  ; i  + '       g   i     EKJ  ; i  + '       g   i     Lq; i  + '       g   i     K  ; i)c                 0    \         P                  ! V R 7      # rt   rf   r  s   &r   r  5TestArrayMethods.test_arange_throws.<locals>.<lambda>      biiQ'r   c                 0    \         P                  ! V R 7      # ry   rf   r  s   &r   r  r    r  r   c                 0    \         P                  ! V R 7      # r~   rf   r  s   &r   r  r    s    biia(r   c                 0    \         P                  ! WR 7      # r   rf   r  s   &&r   r  r    s    2r   c                 0    \         P                  ! WR 7      # ))ru   r:   rf   r  s   &&r   r  r    s    3r   Tru  NignorezMaximum allowed size exceeded)r   r   r   )rg  rS  r	   r   ro   r   r  ZeroDivisionErrorrT  warningscatch_warningssimplefilterr  rV  rW  )	r(  bad_funcs_1bad_funcs_2r=  r[  r@  finputspermitted_errorss	   &        r   test_arange_throws#TestArrayMethods.test_arange_throws  s   ! ('(
 33

 "F"";//6T*62a 0/ " "F"";//6T*62a 0/ " T"6*!Arxx{A.	: %6z#B &&'788F!0022 --h76
 3 MM"A #F$4$4 57 98	 ; " 0// 0// 32 988s<   F
F"G
	1F7-G
	F"F47GG
	
Gc                |    \        R R7      R 4       pRpV P                  V! V4      VP                  V4      4       R# )Tru  c                 @    \         P                  ! ^ ^V ,           V 4      # )r   rf   rz   s   &r   r  2TestArrayMethods.test_arange_accuracy.<locals>.foo  s    99QD$//r   g[R֯?N)r   r5  r  )r(  r  r   s   &  r   test_arange_accuracy%TestArrayMethods.test_arange_accuracy  s>     
d		0 
	0 !AA7r   c                  a aa \         o\        R R7      ! S4      oVVV 3R lpVV 3R lpS P                  4        V! \        P                  ! R.4      4       V! \        P
                  ! R..4      4       V! \        P                  ! R4      4       V! \        P                  ! R 4      4       V! \        P                  ! R4      4       V! \        P                  ! ^^.4      4       V! \        P                  ! . 4      4       R# )Tru  c                 J   < S! V 4      pS! V 4      pSP                  W!4       R # r   rQ  )r6   rA  rB  r@  r=  r(  s   &  r   r  ,TestArrayMethods.test_item.<locals>.check_ok  s#    c{H*C##C2r   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>item(): can only convert an array of size 1 to a Python scalarrS  rT  r  rV  rW  )r6   r[  r@  r(  s   & r   r  -TestArrayMethods.test_item.<locals>.check_err  sH    "":..&c
 /MMZf../1 /.r  r.                ?N)r   r   rg  r   r   r3  rf  rp  r(  r  r  r@  r=  s   f  @@r   	test_itemTestArrayMethods.test_item  s    T"6*	3
	1 	! 	SE"#x()#$ C!"((Aq6"#"((2,r   c                  a aa \         o\        R R7      ! S4      oVVV 3R lpVV 3R lpS P                  4        V! \        P                  ! R.4      ^*4       V! \        P
                  ! R..4      ^*4       V! \        P                  ! R4      ^*4       V! \        P                  ! ^^.4      4       V! \        P                  ! . 4      4       R# )Tru  c                    < V P                  4       pV P                  4       pS! W!4       S! W14       SP                  W24       R # r   )rJ   r5  )r   r   rA  rB  r@  r=  r(  s   &&  r   r  /TestArrayMethods.test_itemset.<locals>.check_ok/  s6    vvxH&&(C8#M##C2r   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)r`  Nz/itemset(): can only write to an array of size 1r  )r   r[  r@  r(  s   & r   r  0TestArrayMethods.test_itemset.<locals>.check_err6  sJ    "":..&a /MMKf../1 /.s   
AA(	r.  r  N)r   r   rg  r   r   r3  rf  r  s   f  @@r   test_itemsetTestArrayMethods.test_itemset*  s    T"6*	3	1 	! 	SE"B'x("-##"((Aq6"#"((2,r   c           
        \         p\        RR7      ! V4      p\        P                  \        P                  \        P
                  \        P                  \        P                  \        P                  \        P                  .pV Uu. uFN  p\        P                  ! RV4      \        P                  ! ^V4      \        P                  ! RV4      R,          .NKP  	  pp\        P                  \        P                  \        P                  .pV Uu. uF1  p\        P                  ! RV4      \        P                  ! ^V4      .NK3  	  ppV Fe  pV F\  pV P                  RP                  VP                   4      4      ;_uu_ 4        V P#                  V! V4      V! V4      4       RRR4       K^  	  Kg  	  R# u upi u upi   + '       g   i     K  ; i)zJtest sum over a whole range of dtypes, no axis or dtype parameter
        Tru  zTest np.sum with {} input Nr     rA  r   r  r  r  )r   r   r   r2  r   r  r   r   r3  timedelta64r   r  r  rp  subTestr   r:   r5  )	r(  r=  r@  
all_dtypes	arr_dtypeall_test_arraysunsigned_dtypesarr_listr   s	   &        r   test_sumTestArrayMethods.test_sumG  sl    T"6*jj"**bhhllBMM2>>C
 (	) (	 WW_i0WWQ	"WWVY'",. (	 	 ) 99bii: -. -	 WW_i0WWQ	"$, 	 .
 (H\\">"E"Ecii"PQQ++F3KsD RQ   (). RQQs   AF77F<G	Gc                   \         p\        RR7      ! V4      p\        P                  \        P                  \        P
                  \        P                  \        P                  \        .pV Uu. uFN  p\        P                  ! RV4      \        P                  ! ^V4      \        P                  ! RV4      R,          .NKP  	  pp\        P                  \        P                  .pTV Uu. uF1  p\        P                  ! RV4      \        P                  ! ^V4      .NK3  	  up,          pV F  pV F  pR	 F  p	V	\        VP                  4      ^,
          8  d   K&  V P                  RP                  VP                   4      4      ;_uu_ 4        V P#                  V! WR7      V! WR7      4       RRR4       K  	  K  	  K  	  R# u upi u upi   + '       g   i     K  ; i)
z;test sum with axis parameter over a whole range of dtypes  Tru  #Testing np.sum(axis) with {} input rb   Nr!  r#  r$  r   r   r   )r   r   r   r2  r   r  r   r3  TIMEDELTA_Mr   r  rp  lenr   r&  r   r:   r5  )
r(  r=  r@  r'  r(  r)  r*  r+  r   rc   s
   &         r   test_sum_axis_kws1#TestArrayMethods.test_sum_axis_kws1_  s   #T"6*jj"**bhhmm[2
 (	) (	 WW_i0WWQ	"WWVY'",. (	 	 ) 99bhh/ -. -	 WW_i0WWQ	"$,. 	.
 (H%Dc#))nQ..  '//5vcii/@B B//s0F05c0EGB B &   ().B B Bs   /AG*7G
!GG c                V   \         p\        RR7      ! V4      p\        P                  .p\        P                  ! R4      \        P
                  \        P                  ! R4      \        P                  \        P                  ! R4      \        P
                  \        P                  ! \        4      \        P                  ! \        4      /pV Uu. uFN  p\        P                  ! R	V4      \        P                  ! ^V4      \        P                  ! R
V4      R,          .NKP  	  pp\        P                  .pTV Uu. uF1  p\        P                  ! R	V4      \        P                  ! ^V4      .NK3  	  up,          pV EF	  pV F  p	R F  p
V
\        V	P                  4      ^,
          8  d   K&  V P                  RP                  V	P                  4      4      ;_uu_ 4        V! WR7      pV! WR7      p\        V\        P                  4      '       dR   V P!                  VP#                  WIP                  ,          4      VP#                  WIP                  ,          4      4       MV P%                  W4       RRR4       K  	  EK  	  EK  	  R# u upi u upi   + '       g   i     EK!  ; i)a]  testing uint32 and int32 separately

uint32 and int32 must be tested separately because Numpy's current
behaviour is different in 64bits Windows (accumulates as int32)
and 64bits Linux (accumulates as int64), while Numba has decided to always
accumulate as int64, when the OS is 64bits. No testing has been done
for behaviours in 32 bits platforms.
Tru  r   r  r  r/  rb   Nr!  r#  r$  r0  )r   r   r   r   r:   r  r  r1  r   r  r2  r   r&  r   r?   ndarrayr5  r   rU  )r(  r=  r@  r'  
out_dtypesr(  r)  r*  r+  r   rc   npy_res	numba_ress   &            r   test_sum_axis_kws2#TestArrayMethods.test_sum_axis_kws2{  s    $T"6*hhZ
hhw'288H3Eryyhhw'hh{+RXXk-BD
 (	) (	 WW_i0WWQ	"WWVY'",. (	 	 ) 99+ -. -	 WW_i0WWQ	"$,. 	.
 (H%Dc#))nQ..  '//5vcii/@B B"("8$)#$9	%i<< 33 'z))/D E ) 0 0II1F GI
 !,,W@B B &   ().B B Bs   AJ:7JBJJ(c                
   \         p\        RR7      ! V4      p\        P                  \        P                  \        P
                  \        P                  \        P                  \        P                  .pV Uu. uFN  p\        P                  ! RV4      \        P                  ! ^V4      \        P                  ! RV4      R,          .NKP  	  pp\        P                  \        P                  \        P                  .pV Uu. uF1  p\        P                  ! RV4      \        P                  ! ^V4      .NK3  	  pp\        P                  ! R4      \        P                  .\        P                  ! R4      \        P                  \        P                  .\        P                  ! R4      \        P                  \        P
                  \        P                  .\        P                  ! R4      \        P                  \        P
                  \        P                  \        P                  .\        P                  ! R4      \        P                  \        P
                  \        P                  .\        P                  ! R4      \        P                  \        P
                  .\        P                  ! R	4      \        P                  \        P
                  \        P                  \        P                  \        P                  .\        P                  ! R
4      \        P                  \        P                  .\        P                  ! R4      \        P                  ./	pV F  pV Fz  p	WyP                  ,           Fa  p
RP                  V	P                  V
4      pV P                  V4      ;_uu_ 4        V P!                  V! WR7      V! WR7      4       RRR4       Kc  	  K|  	  K  	  R# u upi u upi   + '       g   i     K  ; i)z;test sum with dtype parameter over a whole range of dtypes Tru  r2  r   r  r   r  r  r  r   r3  z*Testing np.sum with {} input and {} outputr   Nr!  r#  r$  )r   r   r   r2  r   r  r   r   r3  r   r  r  rp  r:   r   r&  r5  )r(  r=  r@  r'  r(  r)  r*  r7  r+  r   	out_dtypesubtest_strs   &           r   test_sum_dtype_kws#TestArrayMethods.test_sum_dtype_kws  s   $T"6*jj"**bhhllBMM3
 (	) (	 WW_i0WWQ	"WWVY'",. (	 	 ) 99bii: -. -	 WW_i0WWQ	"$, 	 .
 hhy)BJJ<hhy)BJJ

+Chhw'"**bhh

)Khhw'"**bhh

BHH)Uhhx(2::rxx*Lhhx(2::rxx*@hhv&RXXrzz288UWU]U](^hh{+bllBMM-Jhh|,r}}o?
 (H!+II!6!6I#O$*F399i$@  k22 33F34P49#4OQ 32 "7   (-).( 322s   9AO'7O,0!O11Pc                l   \         p\        RR7      ! V4      p\        P                  \        P                  \        P
                  \        P                  \        P                  \        P                  .pV Uu. uFN  p\        P                  ! RV4      \        P                  ! ^V4      \        P                  ! RV4      R,          .NKP  	  pp\        P                  \        P                  \        P                  .pV Uu. uF1  p\        P                  ! RV4      \        P                  ! ^V4      .NK3  	  pp\        P                  ! R4      \        P                  .\        P                  ! R4      \        P                  \        P                  .\        P                  ! R4      \        P                  \        P
                  \        P                  .\        P                  ! R4      \        P                  \        P
                  \        P                  \        P                  .\        P                  ! R4      \        P                  \        P
                  \        P                  .\        P                  ! R4      \        P                  \        P                  .\        P                  ! R	4      \        P                  \        P
                  \        P                  \        P                  \        P                  .\        P                  ! R
4      \        P                  \        P                  .\        P                  ! R4      \        P                  ./	pV F  pV F  p	WyP                  ,           F  p
R F  pV\        V	P                  4      ^,
          8  d   K&  RP!                  V	P                  V
4      pV P#                  V4      ;_uu_ 4        V! WV
R7      pV! WV
R7      pV P%                  W4       RRR4       K  	  K  	  K  	  K  	  R# u upi u upi   + '       g   i     K  ; i)zEtest sum with axis and dtype parameters over a whole range of dtypes Tru  r2  r   r  r   r  r  r  r   r3  z+Testing np.sum with {} input and {} output r   Nr!  r#  r$  r0  )r   r   r   r2  r   r  r   r   r3  r   r  r  rp  r:   r2  r   r   r&  r5  )r(  r=  r@  r'  r(  r)  r*  r7  r+  r   r=  rc   r>  py_resnb_ress   &              r   test_sum_axis_dtype_kws(TestArrayMethods.test_sum_axis_dtype_kws  s   )T"6*jj"**bhhllBMM3
 (	) (	 WW_i0WWQ	"WWVY'",. (	 	 ) 99bii: -. -	 WW_i0WWQ	"$, 	 .
 hhy)BJJ<hhy)BJJ

+Chhw'"**bhh

)Khhw'"**bhh

BHH)Uhhx(2::rxx*Lhhx(2::ryy*Ahhv&RXXrzz288UWU]U](^hh{+bllBMM-Jhh|,r}}o?
 (H!+II!6!6I )#cii.1"44$'T(.syy)(D $!\\+66%+C)%LF%*3%KF 33FC 76 !* "7   (-).. 766s   9AP7P&P""P3c                
   \         p\        RR7      ! V4      p\        P                  p\        P                  ! R4      pV P                  V! V^V4      V! V^V4      4       V P                  V! V^V4      V! V^V4      4       R# )zBtesting that axis and dtype inputs work when passed as positional Tru  Nr!  )r   r   r   r2  r   r5  )r(  r=  r@  r:   r   s   &    r   test_sum_axis_dtype_pos_arg,TestArrayMethods.test_sum_axis_dtype_pos_arg  sy    )T"6*

GGO$q!U 3 %a!U 3	5 	q!U 3 %aE 2	4r   c                F   \         p\        R R7      ! V4      p\        P                  ! R4      pV P	                  V! V^ R7      V! V^ R7      4       \
        p\        R R7      ! V4      p\        P                  ! R4      pV P	                  V! VRR7      V! VRR7      4       R# )Tru  r  rb   Nr   )r   r   r   rg   r5  r   r(  r=  r@  r   s   &   r   test_sum_1d_kws TestArrayMethods.test_sum_1d_kws  s    #T"6*IIcNqq 153CD-T"6*IIcNqr 2E!"4EFr   c                    \         p\        R R7      ! V4      p\        P                  ! R4      p^pV P	                  V! W44      V! W44      4       ^pV P	                  V! W44      V! W44      4       R# )Tru  N)r  r   rA  r"  r  r  )r   r   r   r   r5  )r(  r=  r@  r   rc   s   &    r   test_sum_constTestArrayMethods.test_sum_const  sc    &T"6*gg()s 153CDs 153CDr   c                <   V P                  4        \        p\        R R7      ! V4      p\        P                  ! R4      p\        P                  ! R4      pV P                  \        4      ;_uu_ 4        V! V^4       RRR4       V P                  \        4      ;_uu_ 4        V! VR4       RRR4       V P                  \        4      ;_uu_ 4        V! V^4       RRR4       R#   + '       g   i     Lp; i  + '       g   i     LT; i  + '       g   i     R# ; i)Tru  Nr!  r   r  r   )rg  r   r   r   r   rS  rT  r(  r=  r@  r   r   s   &    r   test_sum_exceptions$TestArrayMethods.test_sum_exceptions  s    !T"6*GGO$GGFOz**!QK + z**!RL + z**!QK +* +* +* +**s$   2
C$!
C7
D
$C4	7D	
D	c                   V P                  4        \        R R7      R 4       p\        P                  ! R4      pV P	                  V! V4      VP                  V4      4       \        P                  ! R4      pV P	                  V! V4      VP                  V4      4       \        P                  ! R4      pV P                  \        4      ;_uu_ 4       pV! V4       RRR4       RpV P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)	Tru  c                 &    V P                  RR7      # )r  rb   r  r   rD   s   &r   r  5TestArrayMethods.test_sum_const_negative.<locals>.foo.  s    777##r   Nz"'axis' entry (-1) is out of boundszout of bounds)r   r   r  r   r  )r   r   )rg  r   r   r   r5  r  rS  r
   r  rV  rW  rT  )r(  r  r   r[  errmsgs   &    r   test_sum_const_negative(TestArrayMethods.test_sum_const_negative*  s   !	d		$ 
	$ GGL!AA7GGIAA7GGFO//6F 05fc&"2"234z**fKKN +os6+;+;'<= 0/ +*s   	E&%E9&E6	9F		c                   \         p\        R R7      ! V4      p\        P                  ! R4      pV P	                  V! V4      V! V4      4       V P                  \        4      ;_uu_ 4        V! V^4       RRR4       \        p\        R R7      ! V4      pV P                  \        4      ;_uu_ 4        V! V^R7       RRR4       R#   + '       g   i     LZ; i  + '       g   i     R# ; i)Tru  Nrb   )r   r  )r   r   r   r   r5  rS  r	   r   rJ  s   &   r   test_cumsumTestArrayMethods.test_cumsumB  s    T"6*GGFOq	584{++!QK , "T"6*{++!! ,+ ,+
 ,++s   *
C1CC	C*	c                  a a
a \         o\        R R7      ! S4      o
V
VV 3R lp. pVP                  ^4       VP                  ^4       VP                  ^4       VP                  R4       VP                  \        P                  ! . R	O4      4       VP                  \        P                  ! . R
O. RO.RR7      4       VP                  \        P                  ! . R
O. RO..4      4       VP                  \        P                  ! ^^..^^ ..^^....4      4       VP                  . R	O4       VP                  R
4       VP                  R4       VP                  R4       \        . RO4      p\        P                  \        P                  \        P                  3 FF  p\        P                  ! ^VR7      P                  R\        V4      R7      pV F  pV! WV4       K  	  KH  	  \        P                  ! ^XR7      P                  R\        V4      R7      pVP                  pWw) ^,
          \        P                  ! V4      \        P                  ! V) ^,
          4      V.V) ^,
          ..pV F1  p	S P                  \        4      ;_uu_ 4        S
! WY4       RRR4       K3  	  S P                  \        4      ;_uu_ 4        S
! VR.4       RRR4       S P!                  4        R#   + '       g   i     K  ; i  + '       g   i     L6; i)Tru  c                    < S! W4      pS! W4      pSP                  W#4       \        VR 4      '       d+   SP                  VP                  VP                  8H  4       R# R# )r  N)r5  hasattrrU  r  )r   indrA  rB  r@  r=  r(  s   &&  r   r  )TestArrayMethods.test_take.<locals>.checkU  sQ    c'H/C##H2x))  399!<= *r   r=  r  r   N333333?r  )r   rA  r      r  r   rA  r   )rd  r  r   )re  )rd  r  r   ))r   r  rf  ))rd  )r  )r   r  rQ  )r_   r   r  r   rf  r   r2  r  r3  rg   r  r  sizerS  
IndexErrorr	   rg  )r(  r  test_indicesr  r  r_  ra  szAillegal_indicesr   r@  r=  s   f         @@r   	test_takeTestArrayMethods.test_takeQ  sS   T"6*	> AABBBHH%567BHHi%<CHIBHHy*&=%>?@BHHAx2q'aVH&E%FGH,-I&34EF(::rxx7B		"B'//d7m/LA#a $ 8 IIb#++F$w-+Hffq"((3-3$(9K5C4!8*. A"":..a /. !
 {++!cUO , 	! /.. ,+s   	K(K<(K9<L	c                  a aa \         o\        R R7      ! S4      oVVV 3R lp\        P                  ! ^4      p\        P                  \        P
                  3 F  pV! W#! ^
4      4       K  	  \        P                  ! ^4      P                  ^^4      p\        P                  \        P
                  3 F  pV! W#! ^
4      4       K  	  \        P                  ! ^0\        P                  R7      P                  ^^^^4      p\        P                  \        P                  \        P
                  3 F  pV! W#! ^
4      4       K  	  R# )Tru  c                    < \         P                  ! V 4      pS! W!4      pSP                  VR J 4       \         P                  ! V 4      pS! WA4      pSP                  VR J 4       SP                  W$4       R # r   )r   rJ   
assertTruer5  )	r   r!   rA  ervrB  grvr@  r=  r(  s	   &&    r   r  )TestArrayMethods.test_fill.<locals>.check  s^    wws|H'COOC4K(''#,C/COOC4K(##H2r   r   N)	r   r   r   rg   r2  rp  r  r   r3  )r(  r  r_  r   r@  r=  s   f   @@r   	test_fillTestArrayMethods.test_fill  s    T"6*	3 IIaL**bhh'A!QrUO ( IIbM!!!Q'**bhh'A!QrUO ( IIb-55aAqA**bmmRXX6A!QrUO 7r   c                d   \         p\        R R7      ! V4      p\        P                  ! R^
4      p\        P                  P                  V! V4      V! V4      4       \        P                  ! W34      w  r4VRV,          ,           p\        P                  P                  V! V4      V! V4      4       R# Tru  r  Nr  )r   r   r   r  rQ  r  meshgridr(  r=  r@  r   r   zs   &     r   	test_realTestArrayMethods.test_real  {    T"6*KKR 


q	584{{1 1H


q	584r   c                d   \         p\        R R7      ! V4      p\        P                  ! R^
4      p\        P                  P                  V! V4      V! V4      4       \        P                  ! W34      w  r4VRV,          ,           p\        P                  P                  V! V4      V! V4      4       R# rw  )r   r   r   r  rQ  r  rx  ry  s   &     r   	test_imagTestArrayMethods.test_imag  r}  r   c                   aaa VVV3R  lp\         P                  P                  V! V4      \        RR7      ! V4      ! V4      4       R# )c                 @   < \         P                  ! S! V SS4      4      # r   )r   expm1)r   r  r   r  s   &r   lower_clip_resultHTestArrayMethods._lower_clip_result_test_util.<locals>.lower_clip_result  s    88DE5122r   Tru  N)r   rQ  assert_almost_equalr   )r(  r  r   r   r  r  s   &f&ff r   _lower_clip_result_test_util-TestArrayMethods._lower_clip_result_test_util  s7    	3 	

&&a 01!4	6r   c                   \         \        \        \        3p\        \
        3p\        P                  ! R^
^e4      \        P                  ! R^
^(4      P                  ^^^4      3 EF  pW,            EFo  p\        RR7      ! V4      pRpV P                  \        V4      ;_uu_ 4        V! VRR4       RRR4       \        P                  P                  V! V^ R4      V! V^ R4      4       \        P                  P                  V! VR^ 4      V! VR^ 4      4       \        P                  P                  V! VR^4      V! VR^4      4       WA9   d~   \        P                  ! V4      p\        P                  ! V4      p\        P                  P                  V! VR^V4      V! VR^V4      4       \        P                  P                  Wx4       V P                  WSR^4       EKr  	  EK  	  R#   + '       g   i     ELC; i)r  Tru  &array_clip: must set either max or minNr  r$  )r  r	  r  r  r  r  r   r  r  r   rx  rT  rQ  r  
empty_liker  )	r(  has_out
has_no_outr   r=  r@  rz  rZ  couts	   &        r   	test_clipTestArrayMethods.test_clip  s   NJ8IJ$&78
++c2s+++c2r*221a;=A!..T*62>++J<<!T4( = 

''q!T(:E!Q<MN

''q$(:E!T1<MN

''q"a(8%2q/J$MM!,E==+DJJ++F1b!U,C,1!RD,ACJJ++E811%BB' /= =<<s   &G+	+G<c                D   \         \        \        \        3p\        \
        3p\        P                  ! R^
^(4      P                  ^^^4      p\        P                  ! R^ 4      P                  VP                  4      P                  ^^4      p\        P                  ! ^ ^4      P                  VP                  4      P                  ^^4      p^ RVR.p^ ^VR.pW,            EF(  p\        RR7      ! V4      p	V EF  p
V EF   pV
f:   Vf6   RpV P                  \        V4      ;_uu_ 4        V	! VRR4       RRR4       KA  \        P                  P!                  V! W:V4      V	! W:V4      4       W9   dz   \        P"                  ! V4      p\        P"                  ! V4      p\        P                  P!                  V! W:W4      V	! W:W4      4       \        P                  P!                  W4       V P%                  WW4       EK  	  EK  	  EK+  	  R#   + '       g   i     L; i)r  NTru  r  r  r  r$  )r  r	  r  r  r  r  r   r  r  rg   r   r:   r   rx  rT  rQ  r  r  r  )r(  r  r  r   	a_min_arr	a_max_arrminsmaxsr=  r@  r   r  rz  rZ  r  s   &              r   test_clip_array_min_max(TestArrayMethods.test_clip_array_min_max  s   NJ8IJ$&78
KKR$,,Q15IIb!$++AGG4<<QB	IIaO**1773;;AqA	2y$'1i&**F&v.E!E}F!33JDD!!T40 E JJ++F1U,CU1UZE[\( "a 0!}}Q/

//q0N05a0LN

//<55eM# "  + EDs   *HHc                    \        R R7      ! \        4      pRpV P                  \        V4      ;_uu_ 4        V! R^ ^
4       RRR4       R#   + '       g   i     R# ; irt  r   r  rx  r	   r(  r@  rz  s   &  r   test_clip_bad_array$TestArrayMethods.test_clip_bad_array  sD    T"7+7##K55$2 6555   AA	c                    \        R R7      ! \        4      pRpV P                  \        V4      ;_uu_ 4        V! ^R^
4       RRR4       R#   + '       g   i     R# ; i)Tru  z).*The argument "a_min" must be a number.*r   Nr  r  s   &  r   test_clip_bad_min"TestArrayMethods.test_clip_bad_min  sD    T"7+9##K55!S" 6555r  c                    \        R R7      ! \        4      pRpV P                  \        V4      ;_uu_ 4        V! ^^R4       RRR4       R#   + '       g   i     R# ; i)Tru  z).*The argument "a_max" must be a number.*r   Nr  r  s   &  r   test_clip_bad_max"TestArrayMethods.test_clip_bad_max  sD    T"7+9##K55!Q 6555r  c           	         \        R R7      ! \        4      pRpV P                  \        V4      ;_uu_ 4        V! ^^^
^R7       RRR4       R#   + '       g   i     R# ; i)Tru  r~  r  Nr  r  s   &  r   test_clip_bad_out"TestArrayMethods.test_clip_bad_out  sF    T"7+I##K55!Q" 6555s   AA	c                f   V P                  4        \        R R7      ! \        4      pRp\        P                  ! R^
^(4      P                  ^^^4      p\        P                  ! R^ 4      P                  VP                  4      P                  ^^4      p\        P                  ! ^ ^4      P                  VP                  4      P                  ^^4      p^ V3RV3WE3V^ 3V^3.pV F5  w  rxV P                  \        V4      ;_uu_ 4        V! W7V4       RRR4       K7  	  R#   + '       g   i     KL  ; i)Tru  zA.*shape mismatch: objects cannot be broadcast to a single shape.*Nr  r$  )rg  r   r  r   r  r  rg   r   r:   rx  rT  )	r(  r@  rz  r   r  r  min_maxr   r  s	   &        r   test_clip_no_broadcast'TestArrayMethods.test_clip_no_broadcast  s    !T"7+QKKR$,,Q15IIb!$++AGG4<<QB	IIaO**1773;;AqA	y>B	?)q>Iq>3 $LE''
C88a& 98 $888s   
DD0c                ~   \         \        3 F  p\        R R7      ! V4      p\        P                  ! R^
4      p\        P
                  P                  V! V4      V! V4      4       \        P                  ! W34      w  r4VRV,          ,           p\        P
                  P                  V! V4      V! V4      4       K  	  R# rw  )r  r  r   r   r  rQ  r  rx  ry  s   &     r   	test_conjTestArrayMethods.test_conj%  s    !?3F&v.EC$AJJ##F1IuQx8;;q$DABqDAJJ##F1IuQx8 4r   c           
       aa \         o\        R R7      ! S4      oVV3R lpV! \        P                  ! . RO. RO.4      4       V! \        P                  ! \        P                  ! ^4      4      4       V! \        P                  ! RR.RR.RR..4      4       V! \        P                  ! . 4      4       V! \        P                  ! \        P
                  \        P
                  .4      4       V! \        P                  ! . RORR7      4       V! \        P                  ! \        P                  ! R	4      \        P                  ! R	4      \        P                  ! R
4      \        P                  ! R4      .4      4       R# )Tru  c                 `   < \         P                  P                  S! V 4      S! V 4      4       R # r   )r   rQ  r  )r   r@  r=  s   &r   r  +TestArrayMethods.test_unique.<locals>.check4  s    JJ##F1IuQx8r   g@rc  gRQ@gffffff
@z<U16r   z
2001-01-01z
2001-01-02NATN)r   r   r  )r  r   rA  )r_  r_  B)r  r   r   rf  r  ra  
datetime64rD  s   & @@r   test_uniqueTestArrayMethods.test_unique0  s    T"6*	9 	bhh	9-./bhhrxx{#$bhhc
S$K#s<=>bhhrlbhh'()bhhf56bhhl3l3l3e,. / 	0r   c                   \         p\        R R7      ! V4      p\        P                  ! R4      P	                  ^^4      p\        P                  ! R4      p\        P
                  P                  V! W44      V! W44      4       \        p\        R R7      ! V4      p\        P                  ! R4      P	                  ^^4      p\        P
                  P                  V! W34      V! W34      4       R# )Tru  g      4@r  g      0@N)r  r   r   rg   r  rQ  r  r  rR  s   &    r   test_array_dotTestArrayMethods.test_array_dotB  s     T"6*IIcN""1a(IIbM


qeAk: !T"6*IIcN""1a(


qeAk:r   c                "   \         p\        R R7      ! V4      p^pV\        P                  3p\        P                  P                  V! V!  V! V!  4       V\        P                  ! R4      3p\        P                  P                  V! V!  V! V!  4       V\        P                  3p\        P                  P                  V! V!  V! V!  4       V\        P                  ! R4      3p\        P                  P                  V! V!  V! V!  4       R# )Tru  r   f4N)r"  r   r   r   rQ  r  r:   r   )r(  r=  r@  r!  r   s   &    r   test_array_ctor_with_dtype_arg/TestArrayMethods.test_array_ctor_with_dtype_argR  s    T"6*"(({


%%fdmUD\B"((7##


%%fdmUD\B"**}


%%fdmUD\B"((4. 


%%fdmUD\Br   c                
   \         P                  ! ^\         P                  R7      p^p\        WP                  VR7      p\         P
                  ! . ROVP                  R7      p\         P                  P                  W44       R# )r  r   r:   r   N)r   r  r   rA  r"  r  r   rg   r  r   r:   rf  rQ  r  )r(  bufferr   resultrA  s   &    r   test_frombuffer_offset'TestArrayMethods.test_frombuffer_offset`  sR    1BHH-v\\&I88.fllC


%%f7r   c                
   \         P                  ! ^\         P                  R7      p^p\        WP                  VR7      p\         P
                  ! . ROVP                  R7      p\         P                  P                  W44       R# )   r   r:   r   N)r   r   r   r  r  )r(  r  r   r  rA  s   &    r   test_frombuffer_count&TestArrayMethods.test_frombuffer_counth  sQ    2RXX.v\\G88L=


%%f7r   c                   \         P                  ! ^\         P                  R7      p\        WP                  RR7      p\         P
                  ! . ROVP                  R7      p\         P                  P                  W#4       R# )r  r   r  Nr   )r   r   r   r  r   rA  r"  r  r  )r(  r  r  rA  s   &   r   (test_frombuffer_count_negative_means_all9TestArrayMethods.test_frombuffer_count_negative_means_allp  sM    1BHH-v\\D884FLLI


%%f7r   c                   \         P                  ! ^\         P                  R7      p^p^p\        WP                  W#R7      p\         P
                  ! . ROVP                  R7      p\         P                  P                  WE4       R# )r  r   )r:   r   r   Nr  r  )r(  r  r   r   r  rA  s   &     r    test_frombuffer_offset_and_count1TestArrayMethods.test_frombuffer_offset_and_countw  sV    2RXX.v\\&V88IV\\:


%%f7r   c                   \         P                  ! ^\         P                  R7      p\        V4      ^,           pRpV P	                  \
        V4      ;_uu_ 4        \        WP                  VR7       RRR4       R#   + '       g   i     R# ; i)r  r   z=offset must be non-negative and no greater than buffer lengthr  N)r   rg   r  r2  rx  rT  r   r:   )r(  r  r   rz  s   &   r   test_frombuffer_invalid_offset/TestArrayMethods.test_frombuffer_invalid_offset  sX    2RXX.VqM##J44&VD 5444s   A;;B	c                4   \         P                  ! ^\         P                  R7      p\        V4      ^,           pRpV P	                  \
        V4      ;_uu_ 4        \         P                  ! WP                  VR7       RRR4       R#   + '       g   i     R# ; i)r  r   z%buffer is smaller than requested sizer  N)r   rg   r  r2  rx  rT  r   r:   )r(  r  r   rz  s   &   r   test_frombuffer_invalid_count.TestArrayMethods.test_frombuffer_invalid_count  s\    2RXX.Fa5##J44MM&EB 5444s   #BB	r   )d__name__
__module____qualname____firstlineno____doc__r'  rC  rG  rJ  rh  rk  rn  r   rq  r{  r  r  r  r  r  r  r  r  r  r  r  r   rg   r  r  r  r  r#  r&  r,  r/  r2  rE  rH  rM  rU  rX  r[  rq  rt  rw  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r,  r3  r:  r?  rD  rG  rK  rN  rS  rY  r\  rl  rt  r{  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  __static_attributes____classdictcell____classcell__)r)  __classdict__s   @@r   r$  r$    s'    .78AC("T/0 0 0#\"|&.-`
"0H06:# ))0G0:25.(.
?
4,B
4,DJ(:T*''AF6$!LS>6$38 !*!0%EN)HVI&%7N8 8    8E0G8+AZ#QJ'DR4	GE$>05"n8	5	56C6N@#'	90$ ; ;C8888EC Cr   r$  c                   &   a  ] tR tRt o R tRtV tR# )TestArrayComparisonsi  c                \  a a VV 3R  lp\         o\        P                  ! ^
\        P                  R7      P	                  R4      pV! W"R4       V! W"R,          R4       V! W"P                  4       R4       V! W"P                  R4      R4       V! W"P                  R4       V! W"RR R4       R# )	c                    < \        \        V 4      \        V4      34      ! S4      pSP                  V! W4      W"'       * 34       R # r   r  )r   r   rA  r@  r=  r(  s   &&& r   r  1TestArrayComparisons.test_identity.<locals>.check  s;    &)VAY/08E##E!K%-|$<>r   r   Tr  Fr  N)r   rA  r   )r   r   r  r   r  rJ   rV   rC   )r(  r  r   r=  s   f  @r   test_identity"TestArrayComparisons.test_identity  s    	>
 "hhr*226:ccq64 c88:u%c88H%u-c55% cs8U#r   r   N)r  r  r  r  r  r  r  )r  s   @r   r  r    s     $ $r   r  __main__)r   Nr   )r   r   r   )NNN)g	itertoolsr   r   r  r  unittestr   numpyr   numbar   r   r   
numba.corer   numba.core.errorsr	   r
   numba.np.numpy_supportr   r   numba.tests.supportr   r   r   r   r   r1  TIMEDELTA_Yr   r"   r%   r)   r,   r.   r0   r<   rE   rH   rK   rM   rP   rS   rY   r_   rd   ri   rl   ro   rr   rv   r|   r   r   r   r   r   r   r   r   r   r   r2  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  mainr   r   r   <module>r     s   $ 	 
    # #  : :7 7 "$!"#4"%(!'-&&(,.'2?
( (*zzA ELK2")
$)-%) #wC wCt3$8 $* zMMO r   