+
    :i                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RI	H
t
HtHt ^ RIHt ^ RIHtHtHt ^ RIHtHtHt RR/tR	R/tR
 t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]4      t#]$R8X  d   ]PJ                  ! 4        R# R# )    N)jitnjit)typesutilserrors)_header_lead)TestCasetag
needs_blas)matmul_usecaseimatmul_usecase
DumbMatrixnopythonTforceobjc                    a  V 3R  lpV# )c                    < V S,          # N )xexps   &X/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_operators.pypow_usecase&make_static_power.<locals>.pow_usecase   s    Cx    r   )r   r   s   f r   make_static_powerr      s    r   c                     a  ] tR t^t o ]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       t]R	 4       t]R
 4       t]'       d   ]! ]4      t]! ]4      t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t ]R 4       t!]R 4       t"]R 4       t#]R 4       t$]R 4       t%]R  4       t&]R! 4       t']R" 4       t(]R# 4       t)]R$ 4       t*]R% 4       t+]R& 4       t,R't-V t.R(# ))LiteralOperatorImplc                    W,           # r   r   r   ys   &&r   add_usecaseLiteralOperatorImpl.add_usecase   	    ur   c                    W,          p V # r   r   r   s   &&r   iadd_usecase LiteralOperatorImpl.iadd_usecase        	r   c                    W,
          # r   r   r   s   &&r   sub_usecaseLiteralOperatorImpl.sub_usecase%   r#   r   c                    W,          p V # r   r   r   s   &&r   isub_usecase LiteralOperatorImpl.isub_usecase)   r'   r   c                    W,          # r   r   r   s   &&r   mul_usecaseLiteralOperatorImpl.mul_usecase.   r#   r   c                    W,          p V # r   r   r   s   &&r   imul_usecase LiteralOperatorImpl.imul_usecase2   r'   r   c                    W,          # r   r   r   s   &&r   floordiv_usecase$LiteralOperatorImpl.floordiv_usecase7   	    vr   c                    W,          p V # r   r   r   s   &&r   ifloordiv_usecase%LiteralOperatorImpl.ifloordiv_usecase;       	r   c                    W,          # r   r   r   s   &&r   truediv_usecase#LiteralOperatorImpl.truediv_usecase@   r#   r   c                    W,          p V # r   r   r   s   &&r   itruediv_usecase$LiteralOperatorImpl.itruediv_usecaseD   r'   r   c                    W,          # r   r   r   s   &&r   mod_usecaseLiteralOperatorImpl.mod_usecaseM   r#   r   c                    W,          p V # r   r   r   s   &&r   imod_usecase LiteralOperatorImpl.imod_usecaseQ   r'   r   c                    W,          # r   r   r   s   &&r   r   LiteralOperatorImpl.pow_usecaseV   r7   r   c                    W,          p V # r   r   r   s   &&r   ipow_usecase LiteralOperatorImpl.ipow_usecaseZ   r;   r   c                    W,          # r   r   r   s   &&r   bitshift_left_usecase)LiteralOperatorImpl.bitshift_left_usecase_   r7   r   c                    W,          p V # r   r   r   s   &&r   bitshift_ileft_usecase*LiteralOperatorImpl.bitshift_ileft_usecasec   r;   r   c                    W,	          # r   r   r   s   &&r   bitshift_right_usecase*LiteralOperatorImpl.bitshift_right_usecaseh   r7   r   c                    W,          p V # r   r   r   s   &&r   bitshift_iright_usecase+LiteralOperatorImpl.bitshift_iright_usecasel   r;   r   c                    W,          # r   r   r   s   &&r   bitwise_and_usecase'LiteralOperatorImpl.bitwise_and_usecaseq   r#   r   c                    W,          p V # r   r   r   s   &&r   bitwise_iand_usecase(LiteralOperatorImpl.bitwise_iand_usecaseu   r'   r   c                    W,          # r   r   r   s   &&r   bitwise_or_usecase&LiteralOperatorImpl.bitwise_or_usecasez   r#   r   c                    W,          p V # r   r   r   s   &&r   bitwise_ior_usecase'LiteralOperatorImpl.bitwise_ior_usecase~   r'   r   c                    W,          # r   r   r   s   &&r   bitwise_xor_usecase'LiteralOperatorImpl.bitwise_xor_usecase   r#   r   c                    W,          p V # r   r   r   s   &&r   bitwise_ixor_usecase(LiteralOperatorImpl.bitwise_ixor_usecase   r'   r   c                    V ( # r   r   r   _unuseds   &&r   bitwise_not_usecase_binary.LiteralOperatorImpl.bitwise_not_usecase_binary   	    r	r   c                    V ( # r   r   r   s   &r   bitwise_not_usecase'LiteralOperatorImpl.bitwise_not_usecase   rp   r   c                    V '       * # r   r   rr   s   &r   not_usecaseLiteralOperatorImpl.not_usecase   s	    vr   c                    V ) # r   r   rr   s   &r   negate_usecase"LiteralOperatorImpl.negate_usecase   rp   r   c                    V 5# r   r   rr   s   &r   unary_positive_usecase*LiteralOperatorImpl.unary_positive_usecase   rp   r   c                
    W8  # r   r   r   s   &&r   
lt_usecaseLiteralOperatorImpl.lt_usecase   	    ur   c                
    W8*  # r   r   r   s   &&r   
le_usecaseLiteralOperatorImpl.le_usecase   	    vr   c                
    W8  # r   r   r   s   &&r   
gt_usecaseLiteralOperatorImpl.gt_usecase   r   r   c                
    W8  # r   r   r   s   &&r   
ge_usecaseLiteralOperatorImpl.ge_usecase   r   r   c                
    W8H  # r   r   r   s   &&r   
eq_usecaseLiteralOperatorImpl.eq_usecase   r   r   c                
    W8g  # r   r   r   s   &&r   
ne_usecaseLiteralOperatorImpl.ne_usecase   r   r   c                
    W9   # r   r   r   s   &&r   
in_usecaseLiteralOperatorImpl.in_usecase   r   r   c                
    W9  # r   r   r   s   &&r   not_in_usecase"LiteralOperatorImpl.not_in_usecase   s
    zr   c                    WJ # r   r   r   s   &&r   
is_usecaseLiteralOperatorImpl.is_usecase   s	    vr   r   N)/__name__
__module____qualname____firstlineno__staticmethodr!   r%   r)   r,   r/   r2   r5   r9   r=   r@   r   r   rC   rF   r   rK   rN   rQ   rT   rW   rZ   r]   r`   rc   rf   ri   rn   rs   rv   ry   r|   r   r   r   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s                        %n5&7                                                       r   r   c                     a  ] tR t^t o ]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       t]R	 4       t]R
 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t ]R 4       t!]R 4       t"]R 4       t#]R  4       t$]R! 4       t%]R" 4       t&]R# 4       t']R$ 4       t(]R% 4       t)]R& 4       t*]R' 4       t+]R( 4       t,R)t-V t.R*# )+FunctionalOperatorImplc                .    \         P                  ! W4      # r   )operatoraddr   s   &&r   r!   "FunctionalOperatorImpl.add_usecase       ||A!!r   c                .    \         P                  ! W4      # r   )r   iaddr   s   &&r   r%   #FunctionalOperatorImpl.iadd_usecase       }}Q""r   c                .    \         P                  ! W4      # r   )r   subr   s   &&r   r)   "FunctionalOperatorImpl.sub_usecase   r   r   c                .    \         P                  ! W4      # r   )r   isubr   s   &&r   r,   #FunctionalOperatorImpl.isub_usecase   r   r   c                .    \         P                  ! W4      # r   )r   mulr   s   &&r   r/   "FunctionalOperatorImpl.mul_usecase   r   r   c                .    \         P                  ! W4      # r   )r   imulr   s   &&r   r2   #FunctionalOperatorImpl.imul_usecase   r   r   c                .    \         P                  ! W4      # r   )r   floordivr   s   &&r   r5   'FunctionalOperatorImpl.floordiv_usecase         &&r   c                .    \         P                  ! W4      # r   )r   	ifloordivr   s   &&r   r9   (FunctionalOperatorImpl.ifloordiv_usecase   s    !!!''r   c                .    \         P                  ! W4      # r   )r   truedivr   s   &&r   r=   &FunctionalOperatorImpl.truediv_usecase       %%r   c                .    \         P                  ! W4      # r   )r   itruedivr   s   &&r   r@   'FunctionalOperatorImpl.itruediv_usecase   r   r   c                .    \         P                  ! W4      # r   )r   modr   s   &&r   rC   "FunctionalOperatorImpl.mod_usecase   r   r   c                .    \         P                  ! W4      # r   )r   imodr   s   &&r   rF   #FunctionalOperatorImpl.imod_usecase   r   r   c                .    \         P                  ! W4      # r   )r   powr   s   &&r   r   "FunctionalOperatorImpl.pow_usecase   r   r   c                .    \         P                  ! W4      # r   )r   ipowr   s   &&r   rK   #FunctionalOperatorImpl.ipow_usecase   r   r   c                .    \         P                  ! W4      # r   )r   matmulr   s   &&r   r   %FunctionalOperatorImpl.matmul_usecase       q$$r   c                .    \         P                  ! W4      # r   )r   imatmulr   s   &&r   r   &FunctionalOperatorImpl.imatmul_usecase  r   r   c                .    \         P                  ! W4      # r   )r   lshiftr   s   &&r   rN   ,FunctionalOperatorImpl.bitshift_left_usecase  r   r   c                .    \         P                  ! W4      # r   )r   ilshiftr   s   &&r   rQ   -FunctionalOperatorImpl.bitshift_ileft_usecase  r   r   c                .    \         P                  ! W4      # r   )r   rshiftr   s   &&r   rT   -FunctionalOperatorImpl.bitshift_right_usecase  r   r   c                .    \         P                  ! W4      # r   )r   irshiftr   s   &&r   rW   .FunctionalOperatorImpl.bitshift_iright_usecase  r   r   c                .    \         P                  ! W4      # r   )r   and_r   s   &&r   rZ   *FunctionalOperatorImpl.bitwise_and_usecase  r   r   c                .    \         P                  ! W4      # r   )r   iandr   s   &&r   r]   +FunctionalOperatorImpl.bitwise_iand_usecase  r   r   c                .    \         P                  ! W4      # r   )r   or_r   s   &&r   r`   )FunctionalOperatorImpl.bitwise_or_usecase  r   r   c                .    \         P                  ! W4      # r   )r   iorr   s   &&r   rc   *FunctionalOperatorImpl.bitwise_ior_usecase#  r   r   c                .    \         P                  ! W4      # r   )r   xorr   s   &&r   rf   *FunctionalOperatorImpl.bitwise_xor_usecase'  r   r   c                .    \         P                  ! W4      # r   )r   ixorr   s   &&r   ri   +FunctionalOperatorImpl.bitwise_ixor_usecase+  r   r   c                .    \         P                  ! V 4      # r   r   invertrl   s   &&r   rn   1FunctionalOperatorImpl.bitwise_not_usecase_binary/      q!!r   c                .    \         P                  ! V 4      # r   r   rr   s   &r   rs   *FunctionalOperatorImpl.bitwise_not_usecase3  r   r   c                .    \         P                  ! V 4      # r   )r   not_rr   s   &r   rv   "FunctionalOperatorImpl.not_usecase7  s    }}Qr   c                .    \         P                  ! V 4      # r   )r   negrr   s   &r   ry   %FunctionalOperatorImpl.negate_usecase;      ||Ar   c                .    \         P                  ! V 4      # r   )r   posrr   s   &r   r|   -FunctionalOperatorImpl.unary_positive_usecase?  r  r   c                .    \         P                  ! W4      # r   )r   ltr   s   &&r   r   !FunctionalOperatorImpl.lt_usecaseC      {{1  r   c                .    \         P                  ! W4      # r   )r   ler   s   &&r   r   !FunctionalOperatorImpl.le_usecaseG  r  r   c                .    \         P                  ! W4      # r   )r   gtr   s   &&r   r   !FunctionalOperatorImpl.gt_usecaseK  r  r   c                .    \         P                  ! W4      # r   )r   ger   s   &&r   r   !FunctionalOperatorImpl.ge_usecaseO  r  r   c                .    \         P                  ! W4      # r   )r   eqr   s   &&r   r   !FunctionalOperatorImpl.eq_usecaseS  r  r   c                .    \         P                  ! W4      # r   )r   ner   s   &&r   r   !FunctionalOperatorImpl.ne_usecaseW  r  r   c                .    \         P                  ! W4      # r   r   containsr   s   &&r   r   !FunctionalOperatorImpl.in_usecase[  r   r   c                8    \         P                  ! W4      '       * # r   r  r   s   &&r   r   %FunctionalOperatorImpl.not_in_usecase_  s    $$Q***r   c                .    \         P                  ! W4      # r   )r   is_r   s   &&r   r   !FunctionalOperatorImpl.is_usecasec  r   r   r   N)/r   r   r   r   r   r!   r%   r)   r,   r/   r2   r5   r9   r=   r@   rC   rF   r   rK   r   r   rN   rQ   rT   rW   rZ   r]   r`   rc   rf   ri   rn   rs   rv   ry   r|   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r      s#    " " # # " " # # " " # # ' ' ( ( & & ' ' " " # # " " # # % % & & % % & & % % & & # # # # " " " " " " # # " " " "         ! ! ! ! ! ! ! ! ! ! ! ! ' ' + + " "r   r   c                   V  a  ] tR tRt o Rt]tR]P                  R]P                  R]P                  R]P                  R]P                  R]P                  R	]P                  R
]P                  R]P                   R]P"                  R]P$                  /t]3R lt]3R ltR t]R3R lt. RbOt]P6                  ]P8                  ]P:                  ]P<                  ]P>                  ]P@                  .t!]PD                  ]PF                  .t$]3R lt%R t&]3R lt'R t(]3R lt)R t*]3R lt+R t,]3R lt-R t.]3R lt/R t0R t1R  t2]3R! lt3]3R" lt4]3R# lt5]3R$ lt6]3R% lt7RcR' lt8]8! ]9! 4       RdR(R)R*R+R,R-/4       ]8! ]9! 4       ReR(R)R*R+R,R-/4       ]8! ]9! 4       RfR(R)R*R./4       ]R&3R/ lt:]3R0 lt;R1 t<]3R2 lt=R3 t>]3R4 lt?R5 t@]3R6 ltA]3R7 ltB]8! ]9! 4       RgR(R8R*R9/4       ]3R: ltCR; tD]3R< ltER= tF]3R> ltGR? tH]3R@ ltIRA tJ]3RB ltKRC tLRD tMRE tNRF tO]PRG 4       tQRH tRRI tS]3RJ ltT]8! ]9! 4       RhR(RK/4       ]3RL ltU]8! ]9! 4       RiR(RM/4       ]3RN ltV]8! ]9! 4       RjR(RORPRQ/4       ]3RR ltWRS tXRT tYRU tZRV t[RW t\RX t]RY t^RZ t_R[ t`]3R\ ltaR] tb]3R^ ltcR_ tdR`teV tfRa# )kTestOperatorsih  zk
Test standard Python operators on scalars.

NOTE: operators on array are generally tested in test_ufuncs.
rN   rQ   rT   rW   rZ   r]   r`   rc   rf   ri   rn   c                   V F  p\        V3/ VB ! V4      p\        P                  ! W#4       F  w  r\        P                  ! V4      p
\        P                  ! V4      pV! W4      pV! W4      pV P	                  WR V: RV	: RV: RV: RV: 2
R7       V P	                  WR V: RV	: RV: RV
: RV: 2
R7       K  	  K  	  R# )mismatch for (, ) with types :  != msgN)r   	itertoolsproductcopyassertPreciseEqualselfpyfunc
x_operands
y_operands
types_listflags	arg_typescfuncr   r    x_got
x_expectedgotexpecteds   &&&&&&        r   run_test_intsTestOperators.run_test_ints  s    #I	+U+F3E!))*A 		!!YYq\
Eo!*0''aC; ( < '':aE:? ( @ B $r   c                v   V F  p\        V3/ VB ! V4      p\        P                  ! W#4       F  w  r\        P                  ! V4      p
\        P                  ! V4      pV! W4      pV! W4      p\        P
                  P                  WR R7       \        P
                  P                  WR R7       K  	  K  	  R# )gh㈵>)rtolN)r   r1  r2  r3  nptestingassert_allcloser5  s   &&&&&&        r   run_test_floatsTestOperators.run_test_floats  s    #I	+U+F3E!))*A 		!!YYq\
Eo!*0

**3t*D

**54*H B $r   c                Z   \        VR 4      '       d   VP                  V4      # V\        P                  9   d   \	        \        VP                  4      4      # V\        P                  9   d   \        VP                  4      # V\        P                  9   d   \        VP                  4      # V# )dtype)
hasattrcast_python_valuer   unsigned_domainabsintrealinteger_domainreal_domainfloat)r6  op
numba_types   &&&r   coerce_operandTestOperators.coerce_operand  s~    2w//335000s277|$$5///rww<5,,,>!Ir   Tc                   V P                   pV P                  pV'       g   WPP                  ,           pV F  p\        Wf33/ VB ! V4      p\        P
                  ! WD4       Fz  w  rV P                  W4      pV P                  W4      p	V! W4      p
V! W4      pV P                  \        V4      \        V
4      4       V P                  WR V: RV: RV	: R24       K|  	  K  	  R# )zmismatch with z (r+  )N)
compare_scalar_operandscompare_typescompare_unordered_typesr   r1  r2  rX  assertIstypeassertEqual)r6  r7  r;  orderedopsr:  typr=  r   r    rA  r@  s   &&&&        r   run_test_scalar_compare%TestOperators.run_test_scalar_compare  s    **''
#&B&BBJC
,e,V4E!))#3''/''/!!<Akd3ih8  h$'A"/0 4 r   c                R    V P                  V P                  P                  V4       R # r   )re  rV  r   r6  r;  s   &&r   test_lt_scalarTestOperators.test_lt_scalar      $$TWW%7%7?r   c                2    V P                  \        R 7       R# r;  N)ri  Noflagsr6  s   &r   test_lt_scalar_npm TestOperators.test_lt_scalar_npm      '*r   c                R    V P                  V P                  P                  V4       R # r   )re  rV  r   rh  s   &&r   test_le_scalarTestOperators.test_le_scalar  rk  r   c                2    V P                  \        R 7       R# rm  )ru  ro  rp  s   &r   test_le_scalar_npm TestOperators.test_le_scalar_npm  rs  r   c                R    V P                  V P                  P                  V4       R # r   )re  rV  r   rh  s   &&r   test_gt_scalarTestOperators.test_gt_scalar  rk  r   c                2    V P                  \        R 7       R# rm  )r{  ro  rp  s   &r   test_gt_scalar_npm TestOperators.test_gt_scalar_npm  rs  r   c                R    V P                  V P                  P                  V4       R # r   )re  rV  r   rh  s   &&r   test_ge_scalarTestOperators.test_ge_scalar  rk  r   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_ge_scalar_npm TestOperators.test_ge_scalar_npm  rs  r   c                V    V P                  V P                  P                  VR R7       R# F)rb  N)re  rV  r   rh  s   &&r   test_eq_scalarTestOperators.test_eq_scalar  !    $$TWW%7%7$Nr   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_eq_scalar_npm TestOperators.test_eq_scalar_npm  rs  r   c                V    V P                  V P                  P                  VR R7       R# r  )re  rV  r   rh  s   &&r   test_ne_scalarTestOperators.test_ne_scalar  r  r   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_ne_scalar_npm TestOperators.test_ne_scalar_npm  rs  r   c                    \        \        P                  \        P                  34      ! V P                  P                  4      pV P                  V! \        \        4      4       R # r   )r   r   ellipsisrV  r   
assertTrueEllipsis)r6  r=  s   & r   test_is_ellipsisTestOperators.test_is_ellipsis  s;    ennenn56tww7I7IJh12r   c                  a \        \        P                  \        P                  3R R7      ! V P                  P                  4      o\        R R7      V3R l4       pV P                  V! ^^4      4       V P                  V! ^^4      4       R# )Tr   c                    < S! W4      # r   r   )r   r    
cfunc_voids   &&r   r=  -TestOperators.test_is_void_ptr.<locals>.cfunc  s    a##r   N)r   r   voidptrrV  r   r  assertFalse)r6  r=  r  s   & @r   test_is_void_ptrTestOperators.test_is_void_ptr  sr    ]]EMM*T

''



 
d		$ 
	$ 	a$q!%r   c                    . ROp. ROp\         P                  \         P                  3.pV P                  WWEVR7       R# )Frn  NFFTT)FTFT)r   booleanrB  r6  r7  r;  r8  r9  r:  s   &&&   r   run_binop_boolsTestOperators.run_binop_bools  s;    /
/
}}emm45
6z!& 	 	(r   c                   . ROp. ROp\         P                  \         P                  3\         P                  \         P                  3.pV P                  WWEVR7       ^^.p^^.p\         P                  \         P                  3\         P
                  \         P
                  3\         P                  \         P                  3.pV P                  WWEVR7       R# )   rn  N)r         )r     r   int32int64rB  byteuint32uint64r  s   &&&   r   run_binop_intsTestOperators.run_binop_ints  s    "
#
{{EKK0{{EKK02
 	6z!& 	 	( V
V
zz5::.||U\\2||U\\24
 	6z!& 	 	(r   c                    . ROp. ROp\         P                  \         P                  3\         P                  \         P                  3.pV P                  WWEVR7       R# )皙?rn  N)g        r  )g      g?g @r   float32float64rI  r  s   &&&   r   run_binop_floatsTestOperators.run_binop_floats"  sO    %
%
}}emm4}}emm46
 	V#( 	 	*r   c                *    V P                  WR 7       R# rm  )r  )r6  r7  r;  s   &&&r   run_binop_floats_floordiv'TestOperators.run_binop_floats_floordiv,  s    f2r   c                    . ROp. ROp\         P                  \         P                  3\         P                  \         P                  3.pV P                  WWEVR7       R# )r  rn  N)y333333?y                y        ?)y      ffffffy        ?y @       )r   	complex64
complex128rI  r  s   &&&   r   run_binop_complexTestOperators.run_binop_complex/  sS    4
4
8'')9)9:<
 	V#( 	 	*r   Fc                b  a V F  pVP                  4        F  w  rVR
 F  pRV: RV: 2pV'       d
   VR,          pV'       d   \        M\        p	RV,          p
VW3R loV'       d   RV9   d   V'       g   V3R lpMSpWn        V'       d   \	        R4      ! V4      pWV&   K  	  K  	  K  	  R	# )Ftest___npmz
%s_usecasec                 X    \        W4      p\        V P                  V4      pV! WS4       R # r   )getattrrV  )r6  runner_nameusecase_namer;  runner
op_usecases   &&&&  r   inner1TestOperators.generate_binop_tests.<locals>.innerC  s$    !(!;%,TWWl%C
z1r   arrayc                    < V P                  4       ;_uu_ 4        S! 4        R R R 4       R #   + '       g   i     R # ; ir   )assertTypingError)r6  r  s   &r   	test_meth5TestOperators.generate_binop_tests.<locals>.test_methJ  s&    !%!7!7!9!9 % ":!9!9!9s   ,=		importantNFT)itemsro  force_pyobj_flagsr   r
   )nsusecases
tp_runners	npm_arrayusecasetp_namer  r   	test_namer;  r  r  r  s   &&&&        @r   generate_binop_tests"TestOperators.generate_binop_tests9  s    G(2(8(8(:$ -H07 AI!V+	'/G5FE#/'#9L0;+72  Gw$6y( %*	)2&$'$4Y$?	$-yM3 !. );  r   intsr  floatsr  complexr  r  c                   \        V P                  V4      p\        P                  \        P                  \        P
                  .pV'       d    VP                  \        P                  4       V Fv  p\        Ww33/ VB ! V4      pV P                  \        4      ;_uu_ 4       p	V! ^^ 4       RRR4       V\        Jg   KQ  V P                  V\        X	P                  4      4       Kx  	  R#   + '       g   i     LG; i)r  N)r  rV  r   r  r  r  appendr  r   assertRaisesZeroDivisionErrorr  assertInstr	exception)
r6  r  r0  r;  allow_complexr7  r<  tpr=  cms
   &&&&&     r   check_div_errorsTestOperators.check_div_errorsm  s    ,/ [[%,,>	U--.B*E*62E""#455a 6 --c3r||#45 55s   "
C++C;c                0    V P                  R RVRR7       R# )r=   division by zeroT)r;  r  Nr  rh  s   &&r   test_truediv_errors!TestOperators.test_truediv_errors}  s     /1C5,0 	 	2r   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_truediv_errors_npm%TestOperators.test_truediv_errors_npm  s      w /r   c                .    V P                  R RVR7       R# )r5   r  rn  Nr  rh  s   &&r   test_floordiv_errors"TestOperators.test_floordiv_errors  s    02DERr   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_floordiv_errors_npm&TestOperators.test_floordiv_errors_npm      !!!0r   c                .    V P                  R RVR7       R# )rC   zmodulo by zerorn  Nr  rh  s   &&r   test_mod_errorsTestOperators.test_mod_errors  s    m-=UKr   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_mod_errors_npm!TestOperators.test_mod_errors_npm  s    7+r   c                   . ROp. ROp\         P                  \         P                  3\         P                  \         P                  3.pV P                  WWEVR7       . ROp. ROp\         P                  \         P                  3\         P
                  \         P
                  3\         P                  \         P                  3.pV P                  WWEVR7       R# )r  rn  Nr  r   r  r  r   r  r  r  r  s   &&&   r   run_pow_intsTestOperators.run_pow_ints  s    &

{{EKK0{{EKK02
 	6z!& 	 	( 

zz5::.||U\\2||U\\24
 	6z!& 	 	(r   c                t   . ROp. ROp\         P                  \         P                  3\         P                  \         P                  3.pV P                  WWEVR7       R.p. ROp\         P                  \         P                  3\         P                  \         P                  3.pV P                  WWEVR7       R# )vk@rn  r  N)gvkgv[gv[@r  r  r  r  r  s   &&&   r   run_pow_floatsTestOperators.run_pow_floats  s    ;
&
}}emm4}}emm46
 	V#( 	 	* U

}}emm4}}emm46
 	V#( 	 	*r   r  r  c                    V P                   P                  p. ROpTp\        P                  \        P                  3\        P                  \        P                  3.pV P                  W#WEVR7       R# )r  rn  Ny      ?        y              ?y            )rV  r!   r   r  r  rI  r6  r;  r7  r8  r9  r:  s   &&    r   test_add_complexTestOperators.test_add_complex  sb    $$&

8'')9)9:=
 	V#( 	 	*r   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_add_complex_npm"TestOperators.test_add_complex_npm      G,r   c                    V P                   P                  p. ROp. ROp\        P                  \        P                  3\        P                  \        P                  3.pV P                  W#WEVR7       R# r  rn  Nr  )r  r  r  )rV  r)   r   r  r  rI  r  s   &&    r   test_sub_complexTestOperators.test_sub_complex  b    $$&

8'')9)9:=
 	V#( 	 	*r   c                2    V P                  \        R 7       R# rm  )r   ro  rp  s   &r   test_sub_complex_npm"TestOperators.test_sub_complex_npm  r  r   c                    V P                   P                  p. ROp. ROp\        P                  \        P                  3\        P                  \        P                  3.pV P                  W#WEVR7       R# r  )rV  r/   r   r  r  rI  r  s   &&    r   test_mul_complexTestOperators.test_mul_complex  r"  r   c                2    V P                  \        R 7       R# rm  )r'  ro  rp  s   &r   test_mul_complex_npm"TestOperators.test_mul_complex_npm  r  r   c                    V P                   P                  p. ROp. ROp\        P                  \        P                  3\        P                  \        P                  3.pV P                  W#WEVR7       R# r  )rV  r=   r   r  r  rI  r  s   &&    r   test_truediv_complex"TestOperators.test_truediv_complex  sb    ((&

8'')9)9:=
 	V#( 	 	*r   c                2    V P                  \        R 7       R# rm  )r-  ro  rp  s   &r   test_truediv_complex_npm&TestOperators.test_truediv_complex_npm  r  r   c                   V P                   P                  p\        \        P                  \        P                  33/ VB ! V4      pV P                  \        4      ;_uu_ 4       pV! R R4       RRR4       \        P                  R9   d   RpM\        \        P                  4      hV P                  V\        XP                  4      4       R#   + '       g   i     Lh; i)y              @y               @Nz!unsupported operand type(s) for %))r  
   r     )r     )r     )r     )rV  rC   r   r   r  r  	TypeErrorr   	PYVERSIONNotImplementedErrorr  r  r  )r6  r;  r7  cresraisesr0  s   &&    r   test_mod_complexTestOperators.test_mod_complex  s    $$EOOU__5??Gy))VRL * ??KK5C%eoo66c3v//01 *)s   $
CC	c                    V P                   P                  pV P                  4       ;_uu_ 4        \        \        P
                  \        P
                  34      ! V4       R R R 4       R #   + '       g   i     R # ; ir   )rV  rC   r  r   r   r  )r6  r7  s   & r   test_mod_complex_npm"TestOperators.test_mod_complex_npm  sI    $$##%%%//5??34V< &%%%s   0A))A:	c                   \        R/ \        B ! V4      p\        ^4      p\        ^4      pV! WE4      pV P                  VP                  ^4       V'       d   V P                  Wd4       R# V P                  Wd4       V P                  We4       R# )r  Nr   )r   r  r   ra  valuer_  assertIsNot)r6  r7  inplacer=  abr@  s   &&&    r   check_matmul_objmode"TestOperators.check_matmul_objmode  so    ,+,V4qMqMAkB'MM#!S$S$r   c                T    V P                  V P                  P                  R R7       R# )FrG  N)rJ  rV  r   rp  s   &r   test_matmulTestOperators.test_matmul  s    !!$''"8"8%!Hr   c                T    V P                  V P                  P                  R R7       R# )TrM  N)rJ  rV  r   rp  s   &r   test_imatmulTestOperators.test_imatmul"  s    !!$''"9"94!Hr   c                v   \         P                  ! \         P                  ^R4      p\        W"34      ! V4      p\        P                  ! ^^.4      p\        P                  ! ^^.4      pV! WE4      pV P                  V\        P                  ! WE4      4       V P                  Wd4       V P                  We4       R# )r  CN)r   Arrayr  r   rF  r4  dotrF  )r6  r7  arrtyr=  rH  rI  r@  s   &&     r   check_matmul_npmTestOperators.check_matmul_npm%  s    EMM1c2e^$V,JJ1vJJ1vAkRVVA\2  r   c                P    V P                  V P                  P                  4       R # r   )rX  rV  r   rp  s   &r   test_matmul_npmTestOperators.test_matmul_npm1  s    dgg445r   c                    V P                  4       ;_uu_ 4       pV P                  V P                  P                  4       R R R 4       R #   + '       g   i     R # ; ir   )r  rX  rV  r   )r6  r=  s   & r   test_imatmul_npmTestOperators.test_imatmul_npm4  s:    ##%%!!$''"9"9: &%%%s   &A		A	c                   ^ ^.p. ROp\         P                  \         P                  3.pV P                  WWEVR7       ^ ^.p. ROp\         P                  \         P                  3.pV P                  WWEVR7       ^ R.p. ROp\         P                  \         P                  3.pV P                  WWEVR7       ^ R.p. ROp\         P
                  \         P
                  3.pV P                  WWEVR7       R# )r   rn  Nr   r  r              r   r  r  rb  rc  rd      ?   r  r   r  rB  r  r  r  r  s   &&&   r   run_bitshift_leftTestOperators.run_bitshift_left<  s    V
,
||U\\23
6z!& 	 	( V
0
||U\\23
6z!& 	 	( W
,
{{EKK01
6z!& 	 	( W
0
{{EKK01
6z!& 	 	(r   rj  c                   . ROp. ROp\         P                  \         P                  3.pV P                  WWEVR7       . ROp. ROp\         P                  \         P                  3.pV P                  WWEVR7       . ROp. ROp\         P                  \         P                  3.pV P                  WWEVR7       . ROp. ROp\         P
                  \         P
                  3.pV P                  WWEVR7       R# )	r   rn  N)r   r      ra  )r   r      rf  )r   r     )r   r  ro  ri  r  s   &&&   r   run_bitshift_right TestOperators.run_bitshift_rightb  s    &
,
||U\\23
6z!& 	 	( '
0
||U\\23
6z!& 	 	( &
,
{{EKK01
6z!& 	 	( '
0
{{EKK01
6z!& 	 	(r   rp  c                   \        \        ^ ^4      4      R.,           p\        \        ^ ^4      4      R.,           p\        P                  \        P                  3.pV P	                  WWEVR7       \        \        ^ ^4      4      R.,           p\        \        ^ ^4      4      R.,           p\        P
                  \        P
                  3.pV P	                  WWEVR7       \        \        R^4      4      RR.,           p\        \        R^4      4      RR.,           p\        P                  \        P                  3.pV P	                  WWEVR7       \        \        R^4      4      RR	.,           p\        \        R^4      4      RR	.,           p\        P                  \        P                  3.pV P	                  WWEVR7       R# )
r   rn  Nrm  rn  ro               )listranger   r  rB  r  r  r  r  s   &&&   r   run_logicalTestOperators.run_logical  s   %1+&)4
%1+&)4
||U\\23
6z!& 	 	( %1+&)4
%1+&)4
||U\\23
6z!& 	 	( %A,'8Y*??
%A,'8Y*??
{{EKK01
6z!& 	 	( %A,'8Y*??
%A,'8Y*??
{{EKK01
6z!& 	 	(r   ry  boolsr  c                   V P                   P                  p\        \        ^ ^4      4      R.,           pV Uu. uF  p\        P
                  ! V4      NK  	  pp^ .p\        P
                  \        P
                  3.pV P                  W#WVVR7       \        \        R^4      4      RR.,           p^ .p\        P                  \        P                  3.pV P                  W#WVVR7       \        \        ^ ^4      4      R.,           pV Uu. uF  p\        P                  ! V4      NK  	  pp^ .p\        P                  \        P                  3.pV P                  W#WVVR7       \        \        R^4      4      RR	.,           p^ .p\        P                  \        P                  3.pV P                  W#WVVR7       . R
Op\        \        \        P                  V4      4      pV P                   P                  p\        \        P                  33/ VB ! V4      pV F!  p	V P!                  V! V	4      V! V	4      4       K#  	  R# u upi u upi )r   rn  Nrm  rs  ro  rt  rn  ru  rv  r  )rV  rn   rw  rx  rF  r  r   rB  r  r  r  mapbool_rs   r   r  r4  )
r6  r;  r7  r8  r   r9  r:  valuesr=  vals
   &&        r   test_bitwise_notTestOperators.test_bitwise_not  s   33%1+&)4
,67JqbiilJ
7S
||U\\23
6z!& 	 	( %A,'8Y*??
S
{{EKK01
6z!& 	 	( %1+&)4
,67JqbiilJ
7S
||U\\23
6z!& 	 	( %A,'8Y*??
S
{{EKK01
6z!& 	 	(
 ,c"((F+,,,U]]$..v6C##F3Ks< Q 8" 8s   H>Ic                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_bitwise_not_npm"TestOperators.test_bitwise_not_npm  r  r   c                   a  V 3R lp. ROpV FS  p\        S P                  V4      pV! V\        P                  \        P                  3S P                  V,          R7       KU  	  R# )z9
Make sure that bitwise float operations are not allowed
c                   < R P                  V 4      pSP                  \        P                  VR7      ;_uu_ 4       p\	        V4      ! V 4       RRR4       \
        R,           pTP                  \        V\        4      '       d   TMRP                  V4      4      pSP                  V\        XP                  4      4       R#   + '       g   i     L|; i)z'expecting TypingError when compiling {}r/  Nz {}zFunction({}))
formatr  r   TypingErrorr   r   
isinstancer  r  r  )r7  argtypesopnamer0  r=  fmt	expectingr6  s   &&&    r   assert_reject_compile?TestOperators.test_bitwise_float.<locals>.assert_reject_compile  s    ;BB6JC""6#5#53"??6Xv& @ &C

&0&=&= $*(6(=(=f(EGI MM)S)9)9%:; @?s   CC	)r  N)rN   rQ   rT   rW   rZ   r]   r`   rc   rf   ri   rn   )r  rV  r   r  _bitwise_opnames)r6  r  methodsnamer7  s   f    r   test_bitwise_float TestOperators.test_bitwise_float  sS    		<
 DTWWd+F!&5==%--*H)-)>)>t)DF r   c                    V P                   P                  p. ROp\        R/ \        B ! V4      pV F!  pV P	                  V! V4      V! V4      4       K#  	  R# )r  Nr  r  r  333333?        333333@rD  )rV  rv   r   r  ra  r6  r7  r  r=  r  s   &    r   test_notTestOperators.test_not	  sO    $$
 ,+,V4CVC[%*5 r   c                   V P                   P                  p\        P                  \        P                  \        P
                  \        P                  \        P                  .p. ROp\        W#4       Fp  w  rE\        V34      ! V4      pV P                  VP                  ^ ,          P                  \        P                  4       V P                  V! V4      V! V4      4       Kr  	  R# )r  Nr  )rV  rv   r   int8r  r  r  r  zipr   ra  nopython_signaturesreturn_typer  r6  r7  argtysr  tyr  r=  s   &      r   test_not_npmTestOperators.test_not_npm  s    $$ JJKKKKMM

 6*GB"K'EU66q9EE"]],VC[%*5	 +r   c                   V P                   P                  p\        P                  \        P                  \        P
                  \        P                  \        P                  \        P                  \        P                  \        P                  .p. ROp\        W#4       F5  w  rE\        V34      ! V4      pV P                  V! V4      V! V4      4       K7  	  R# r  N)r  r  r  r  g333333@r  TF)rV  ry   r   r  r  r  r  r  r  r  r  r   assertAlmostEqualr  s   &      r   test_negate_npmTestOperators.test_negate_npm1  s    '' JJKKKKMMMMMMMM	
	
 6*GB"K'E""6#;c
; +r   c                    V P                   P                  p. ROp\        R/ \        B ! V4      pV F!  pV P	                  V! V4      V! V4      4       K#  	  R# r  N)r  r  r  r  r  TFrD  )rV  ry   r   r  ra  r  s   &    r   test_negateTestOperators.test_negateM  sO    ''
 ,+,V4CVC[%*5 r   c                   V P                   P                  p\        P                  \        P                  \        P
                  \        P                  \        P                  \        P                  \        P                  \        P                  .p. ROp\        W#4       F5  w  rE\        V34      ! V4      pV P                  V! V4      V! V4      4       K7  	  R# r  )rV  r|   r   r  r  r  r  r  r  r  r  r   r  r  s   &      r   test_unary_positive_npm%TestOperators.test_unary_positive_npm\  s    // JJKKKKMMMMMMMM	
	
 6*GB"K'E""6#;c
; +r   c                    V P                   P                  p. ROp\        R/ \        B ! V4      pV F!  pV P	                  V! V4      V! V4      4       K#  	  R# r  )rV  r|   r   r  ra  r  s   &    r   test_unary_positive!TestOperators.test_unary_positivew  sO    //
 ,+,V4CVC[%*5 r   c                    \         P                  p\        V\         P                  ! V^4      33/ VB ! V4      pR F#  pRpV P	                  V! WV4      V! WV4      4       K%  	  R# )r  N)r  rb  r     *   )r  r  r  )r   r  r   UniTupler4  )r6  r7  r;  rL  r=  itups   &&&    r   	_check_inTestOperators._check_in  sV    UENN5!45??G!AC##F1NE!MB "r   c                R    V P                  V P                  P                  V4       R # r   )r  rV  r   rh  s   &&r   test_inTestOperators.test_in  s    tww))51r   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_in_npmTestOperators.test_in_npm  s    7#r   c                R    V P                  V P                  P                  V4       R # r   )r  rV  r   rh  s   &&r   test_not_inTestOperators.test_not_in  s    tww--u5r   c                2    V P                  \        R 7       R# rm  )r  ro  rp  s   &r   test_not_in_npmTestOperators.test_not_in_npm  s    w'r   r   N)g      y            ?y             @y            ?      ?)F)r   r   r   r   r   r   )r   r   )r   r   r   r   )r   r   )bitshift_leftbitshift_ileft)bitshift_rightbitshift_iright)bitwise_andbitwise_iand
bitwise_orbitwise_iorbitwise_xorbitwise_ixor)gr   r   r   r   __doc__r   rV  r   r   r   r   r   r   r   r   r   r   r   r   r  r  rB  rI  rX  re  r\  r   r  r  r  r  r  r  r]  r  r  r^  ri  rq  ru  rx  r{  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  localsr  r  r  r  r  r  r	  r  r  r  r  r   r$  r'  r*  r-  r0  r>  rA  rJ  rN  rQ  r   rX  r[  r^  rj  rp  ry  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r   s   @r   r(  r(  h  s     
B 	  ("2"2 (//!8#3#3x}}hllx||x||$hoo .@* 0I
 5F(,00 K[[%++\\5<<]]EMM3M  %0@0@A#4 @+ $5 @+ $5 @+ $5 @+ $5 O+ $5 O+3&$ -> ( ,= (( .? * 7H 3 /@ *.> F "2"$6#%8 0 "2"$6#%8 A "2"$? 9J',6  ): 20 *; S1 %6 L, *; (( ,= *( ( ."$4 &7 
*- &7 
*- &7 
*- *; 
*1 &7 2=%II 	! 	!6; /@ (B < "5 
 0A (B > "6 
 ): (B 9 !-!#4	 &7 -=^- FD662<86<66C . 2$ !2 6( (r   r(  c                   &   ] tR tRt]tR]P                  R]P                  R]P                  R]P                  R]P                  R]P                  R]P                  R	]P                  R
]P                  R]P                   R]P"                  /tRtR# )TestOperatorModulei  rN   rQ   rT   rW   rZ   r]   r`   rc   rf   ri   rn   r   N)r   r   r   r   r   rV  r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r  r    sx    	B 	  ("2"2 (//!8#3#3x}}hllx||x||$hoor   r  c                   ,  a ] tR tRt oRt]t. R!Ot]P                  ]P                  ]P                  ]P                  .t] U u. uF  q P                  '       g   K  V NK  	  up t] U u. uF  q P                  '       d   K  V NK  	  up t]! ]P&                  ! ]]4      4      t] UUu. uF.  w  rVP                  '       g   VP                  '       g   K+  W3NK0  	  uppt] UUu. uF0  w  rVP                  '       d   K  VP                  '       d   K-  W3NK2  	  upptR tR tR tR tR tR t]R	 3R
 lt]3R lt]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 t0R t1Rt2Vt3R # u up i u up i u uppi u uppi )"TestMixedIntsi  z4
Tests for operator calls with mixed integer types.
c                    \         P                  ! VP                  4      pVP                  Tu;8*  ;'       d    VP                  8*  # u # r   )rF  iinfokeyminmax)r6  r  r  tp_infos   &&& r   int_in_dtype_range TestMixedInts.int_in_dtype_range  s5    ((266"{{c00W[[0000r   c                    \        R  V 4       4      p\        V\        P                  P                  4      p\	        \
        RV,          4      # )c              3   Z   "   T F!  qP                   P                  ^,          x  K#  	  R# 5irc  NrL  itemsize.0vs   & r   	<genexpr>8TestMixedInts.get_numpy_signed_upcast.<locals>.<genexpr>        :Tww''!++T   )+zint%dr  r   intpbitwidthr  rF  r6  valsr  s   &* r   get_numpy_signed_upcast%TestMixedInts.get_numpy_signed_upcast  s:    :T::x!4!45r7X-..r   c                    \        R  V 4       4      p\        V\        P                  P                  4      p\	        \
        RV,          4      # )c              3   Z   "   T F!  qP                   P                  ^,          x  K#  	  R# 5ir  r  r  s   & r   r  :TestMixedInts.get_numpy_unsigned_upcast.<locals>.<genexpr>  r  r  zuint%dr  r  s   &* r   get_numpy_unsigned_upcast'TestMixedInts.get_numpy_unsigned_upcast  s:    :T::x!4!45r8h.//r   c                B    \        \        VP                  4      ! V4      # r   )r  rF  r  )r6  rd  r  s   &&&r   get_typed_intTestMixedInts.get_typed_int  s    r388$S))r   c                8   a a \        \        V4      oVV 3R  lpV# )c                 P   < SP                  W4      pS! V! V 4      V! V4      4      # r   r  rH  rI  r  rV  r6  s   && r   control_signed8TestMixedInts.get_control_signed.<locals>.control_signed  s(    --a3BbeRU##r   r  r   )r6  r  r  rV  s   f& @r   get_control_signed TestMixedInts.get_control_signed  s    Xv&	$ r   c                8   a a \        \        V4      oVV 3R  lpV# )c                 P   < SP                  W4      pS! V! V 4      V! V4      4      # r   r  r  s   && r   control_unsigned<TestMixedInts.get_control_unsigned.<locals>.control_unsigned  s(    //5BbeRU##r   r  )r6  r  r
  rV  s   f& @r   get_control_unsigned"TestMixedInts.get_control_unsigned  s    Xv&	$  r   c                    V # r   r   rr   s   &r   <lambda>TestMixedInts.<lambda>  s    1r   c           	        V F  w  r\        W34      ! V4      p
\        P                  ! W34       F  w  rV P                  W4      '       d   V P                  W4      '       g   K5  V P	                  W4      pV P	                  W4      pV! W4      pV
! W4      pV P                  W4       R V: RV: RW3: 2pV! V4      V! V4      rV P                  ! W3RV/VB  K  	  K  	  R# )r*  r+  r,  r0  N)r   r1  r2  r  r  assertIsInstancer4  )r6  r7  control_funcoperandsr   expected_type
force_typeassertPreciseEqualArgsxtytr=  r   r    rA  r@  r0  s   &&&&&&&,        r   
run_binaryTestMixedInts.run_binary  s     FB"N6*E!))(=..q55T=T=TUV=[=[&&r-&&r-'-Ak%%c9Q* *3H1EX'' B3 B*@B > r   c                *   V F  p\        V34      ! V4      pV Fq  pV P                  W4      '       g   K  V P                  Wh4      pV! V4      p	V! V4      p
V P                  W4       V P	                  WR V: RV: RV
: RV	: 2R7       Ks  	  K  	  R# )zmismatch for z with type r-  r.  r/  N)r   r  r  r  r4  )r6  r7  r  r  r   r  r  r=  r   rA  r@  s   &&&&&&     r   	run_unaryTestMixedInts.run_unary  s    B"K'E..q55&&r-'?Ah%%c9''b#x1 ( 2  r   c                    V # r   r   rr   s   &r   r  r    s    r   c                    V P                   ! WP                  V4      W0P                  V3R V/VB  V P                   ! WP                  V4      W0P                  V3R V/VB  R# )r  N)r  r  signed_pairsr  unsigned_pairs)r6  r7  r  samplesr  r  r  s   &&&&&&,r   run_arith_binopTestMixedInts.run_arith_binop  sr     	 7 7 ?!2!2M	2#-	2 1	2 	 9 9& A!4!4m	2#-	2 1	2r   c                h    V P                  V P                  P                  R V P                  4       R# )r   N)r$  rV  r!   int_samplesrp  s   &r   test_addTestMixedInts.test_add  $    TWW00%9I9IJr   c                h    V P                  V P                  P                  R V P                  4       R# )r   N)r$  rV  r)   r'  rp  s   &r   test_subTestMixedInts.test_sub  r*  r   c                h    V P                  V P                  P                  R V P                  4       R# )r   N)r$  rV  r/   r'  rp  s   &r   test_mulTestMixedInts.test_mul  r*  r   c                    V P                    Uu. uF  q^ 8w  g   K  VNK  	  ppV P                  V P                  P                  RV4       R# u upi )r   r   N)r'  r$  rV  r5   r6  r   r#  s   &  r   test_floordivTestMixedInts.test_floordiv  sE    "..9.q&11.9TWW55z7K :
   AAc                    V P                    Uu. uF  q^ 8w  g   K  VNK  	  ppV P                  V P                  P                  RV4       R# u upi )r   r   N)r'  r$  rV  rC   r2  s   &  r   test_modTestMixedInts.test_mod  sE    "..9.q&11.9TWW00%A :r5  c                  a  / p\         P                  R8X  d
   \        VR&   S P                  P                  pS P
                   Uu. uF  q3^ 8  g   K  VNK  	  ppS P                  ! VRV3/ VB  V 3R lpS P
                   Uu. uF  q3^ 8w  g   K  VNK  	  ppS P                   UUu. uF0  w  rgVP                  '       g   K  VP                  '       g   K-  Wg3NK2  	  pppS P                  ! W%WH3/ VB  R# u upi u upi u uppi )r  r  r   c                    < SP                  W4      pV^ 8  d   V! V 4      V! V4      ,          # V! V 4      V! V) 4      ,          pV^ 8X  d   ^ # \        P                  ! RV,          4      # )r   g      ?)r  rF  r  )rH  rI  r  invr6  s   &&  r   r  .TestMixedInts.test_pow.<locals>.control_signed+  s\    --a3BAv!u1~%er1"vo!8wwsSy))r   Nr4  )
r   r:  rU  rV  r   r'  r$  
type_pairssignedr  )	r6  
extra_castr7  r   r#  r  ur  r!  s	   f        r   test_powTestMixedInts.test_pow   s    
??g%',J|$$$ #..9.q&11.9VUGBzB		* #..9.q&11.9+/?? 2?4188 () ? 2	=1;	=# : :2s*   C7C7C<C<(DDDc                    \         R  4       pRpW",          pV! V4      pV P                  WC4       V P                  WAP                  V4      4       R# )c                     V ^,          # )r  r   rr   s   &r   pow2.TestMixedInts.test_pow_precision.<locals>.pow2<  s    6Mr   i'N)r   ra  py_func)r6  rE  r   rA  results   &    r   test_pow_precision TestMixedInts.test_pow_precision;  sO    		 
	 5a*a1r   c           	        R  pV P                    Uu. uF  q"^ 8w  g   K  VNK  	  ppV P                  P                  pV P                  WAW0P                  \
        RR7       V P                  WAW0P                  \
        RR7       R# u upi )c                 8    \        V 4      \        V4      ,          # r   )rU  rH  rI  s   &&r   control+TestMixedInts.test_truediv.<locals>.controlH  s    8eAh&&r   double)r  precN)r'  rV  r=   r  r!  rU  r"  )r6  rN  r   r#  r7  s   &    r   test_truedivTestMixedInts.test_truedivF  s    	'"..9.q&11.9((
 	2C2C&+( 	 	<2E2E&+( 	 	< :s
   BBc                h    V P                  V P                  P                  R V P                  4       R# )r   N)r$  rV  rZ   r'  rp  s   &r   test_andTestMixedInts.test_andU  s$    TWW88&$BRBRSr   c                h    V P                  V P                  P                  R V P                  4       R# )r   N)r$  rV  r`   r'  rp  s   &r   test_orTestMixedInts.test_orX  s$    TWW77@P@PQr   c                h    V P                  V P                  P                  R V P                  4       R# )r   N)r$  rV  rf   r'  rp  s   &r   test_xorTestMixedInts.test_xor[  s$    TWW88%AQAQRr   c                  a aaa \        \        V4      oVV 3R  lpVV 3R lpS P                  oVVV 3R lpS P                   UUu. uF  w  rgVP                  '       g   K  Wg3NK  	  pppS P                   UUu. uF  w  rgVP                  '       d   K  Wg3NK  	  p	ppV F  w  rV! WV4       K  	  V	 F  w  rV! WV4       K  	  R# u uppi u uppi )c                 P   < SP                  W4      pS! V! V 4      V! V4      4      # r   r   rH  rI  r  opfuncr6  s   && r   r  5TestMixedInts.run_shift_binop.<locals>.control_signed`  s(    --a3B"Q%A''r   c                 P   < SP                  W4      pS! V! V 4      V! V4      4      # r   r	  r_  s   && r   r
  7TestMixedInts.run_shift_binop.<locals>.control_unsignedc  s(    //5B"Q%A''r   c           	        < \        W34      ! S
4      pS F  pV P                  ^,
          p^ ^^^V^,
          V3 F  pSP                  W@4      '       d   SP                  Wa4      '       g   K3  SP                  W4      pSP                  W4      pV! WF4      pV! WF4      pRV: RV: RW3: 2p	SP	                  WV	R7       K  	  K  	  R# )r  r*  r+  r,  r/  N)r   r  r  r  r4  )r  r  r  r=  r   maxshiftr    rA  r@  r0  r7  r#  r6  s   &&&       r   check,TestMixedInts.run_shift_binop.<locals>.checki  s    "N6*E ;;?Q1hlH=A22199AXAXYZA_A_ **21A**21A+A1H+CRH.C++Cs+C >	 r   N)r  r   r'  r=  r>  )r6  r7  r  r  r
  rf  r@  r  r!  r"  r  r  r`  r#  s   ff&         @@r   run_shift_binopTestMixedInts.run_shift_binop^  s    6*	(	( ""	D( ,0?? %?4188 ? %-1__ +_TQ!" !1&_ + #FB".) #$FB"*+ %%+s   C	!C	:CCc                R    V P                  V P                  P                  R 4       R# )r   N)rh  rV  rN   rp  s   &r   test_lshiftTestMixedInts.test_lshift  s    TWW::HEr   c                R    V P                  V P                  P                  R 4       R# )r   N)rh  rV  rT   rp  s   &r   test_rshiftTestMixedInts.test_rshift  s    TWW;;XFr   c                    R  pV P                   pV P                  P                  pV P                  W1W P                  4       R# )c                     V # r   r   )rH  s   &r   rN  2TestMixedInts.test_unary_positive.<locals>.control  s    Hr   N)r'  rV  r|   r  	int_types)r6  rN  r#  r7  s   &   r   r  !TestMixedInts.test_unary_positive  s3    	""//v@r   c                   a  V 3R  lpV 3R lpS P                   pS P                  P                  pS P                  WAVS P                  4       S P                  WBVS P
                  4       R# )c                 8   < SP                  V 4      pV! V ) 4      # r   r   rH  r  r6  s   & r   r  9TestMixedInts.test_unary_negative.<locals>.control_signed      --a0Bqb6Mr   c                 8   < SP                  V 4      pV! V ) 4      # r   r	  rw  s   & r   r
  ;TestMixedInts.test_unary_negative.<locals>.control_unsigned      //2Bqb6Mr   N)r'  rV  ry   r  signed_typesunsigned_typesr6  r  r
  r#  r7  s   f    r   test_unary_negative!TestMixedInts.test_unary_negative  sU    		 ""''vw8I8IJv$:M:MNr   c                   a  V 3R  lpV 3R lpS P                   pS P                  P                  pS P                  WAVS P                  4       S P                  WBVS P
                  4       R# )c                 8   < SP                  V 4      pV! V ( 4      # r   r   rw  s   & r   r  1TestMixedInts.test_invert.<locals>.control_signed  ry  r   c                 8   < SP                  V 4      pV! V ( 4      # r   r	  rw  s   & r   r
  3TestMixedInts.test_invert.<locals>.control_unsigned  r|  r   N)r'  rV  rs   r  r}  r~  r  s   f    r   test_invertTestMixedInts.test_invert  sU    		 "",,vw8I8IJv$:M:MNr   r   N)r   r  r  r3  r     i'  r  r  iiii)4r   r   r   r   r  r   rV  r'  r   r  uint8r  r  rs  r>  r}  r~  rw  r1  r2  r=  r!  r"  r  r  r  r  r  r  rQ  r  r  r$  r(  r,  r/  r3  r7  rA  rI  rR  rU  rX  r[  rh  rk  rn  r  r  r  r   r   )r  r@  r  r   s   000@r   r  r    s     
BOKU[[%++u||DI!*82iiBB8L#,>9RIIbb9>Ni''	9=>J'1 -ztqxxx188 QFz -L)3 5hh *+(( qf 5N1/
0
*  "%B, !$2" '*k
2KKKLB=6	2<TRS',RFGAOO OW 9>-5s6   F F )FF((F
F
%F FFr  c                       ] tR tRt]tRtR# )TestMixedIntsOperatorModulei  r   N)r   r   r   r   r   rV  r   r   r   r   r  r    s    	Br   r  c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )TestStaticPoweri  zT
Test the ** operator with a static exponent, to exercise a
dedicated optimization.
c           
        V Fo  p\         P                  p\        V4      p\        R R7      ! V4      p\        R R7      ! V4      pV F'  p V! W4      p	V! V4      p
V P	                  WRR7       K)  	  Kq  	  R#   \
         dH    T P                  \
        4      ;_uu_ 4        T! T4       RRR4        Km    + '       g   i      K  ; ii ; i)Tr  rP  )rQ  N)r   r   r   r   r4  r  r  )r6  	exponentsr  r   regular_funcstatic_funcstatic_cfuncregular_cfuncr  rA  r@  s   &&&        r   
_check_powTestStaticPower._check_pow  s    C.::L+C0K-k:L.|<MJ,Q4H
 'q/C++H+I   ) (**+<==$Q >===(s*   A88(C
 	B4)C
4C?C
C
c           	         . ROp^ ^^RR\         P                  ! R4      \         P                  ! ^4      .pV P                  W4       R# )r  Nr  r  )	r  r  r  r     r   r  r  r  rs  )rF  r  uint16r  r6  r  r  s   &  r   test_int_valuesTestStaticPower.test_int_values  s7    3	1aRbiil;	(r   c                    . ROpRRR\         P                  ! R4      \        R4      \        R4      .pV P                  W4       R# )	r  r  g      
@infnanN)r  r  r  r  r  r   r  r  r  i ig      g       )rF  r  rU  r  r  s   &  r   test_real_values TestStaticPower.test_real_values  s6    H	T5"**T"2E%L%,O	(r   r   N)
r   r   r   r   r  r  r  r  r   r   r   s   @r   r  r    s     
J$)) )r   r  c                   0   a  ] tR tRt o RtR tR tRtV tR# )TestStringConstComparisoni  z%
Test comparison of string constants
c                    R  pR p\        RR7      ! V4      p\        RR7      ! V4      pV P                  V! 4       V! 4       4       V P                  V! 4       V! 4       4       R# )c                      R p V R 8H  # testr   ss    r   
test_impl15TestStringConstComparison.test_eq.<locals>.test_impl1      A;r   c                      R p V R8H  # test1r  r   r  s    r   
test_impl25TestStringConstComparison.test_eq.<locals>.test_impl2      A;r   Tr  Nr   ra  r6  r  r  cfunc1cfunc2s   &    r   test_eq!TestStringConstComparison.test_eq  T    		 d#J/d#J/vx0vx0r   c                    R  pR p\        RR7      ! V4      p\        RR7      ! V4      pV P                  V! 4       V! 4       4       V P                  V! 4       V! 4       4       R# )c                      R p V R 8g  # r  r   r  s    r   r  6TestStringConstComparison.test_neq.<locals>.test_impl1  r  r   c                      R p V R8g  # r  r   r  s    r   r  6TestStringConstComparison.test_neq.<locals>.test_impl2  r  r   Tr  Nr  r  s   &    r   test_neq"TestStringConstComparison.test_neq  r  r   r   N)	r   r   r   r   r  r  r  r   r   r   s   @r   r  r    s     11 1r   r  c                   H   a  ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )TestBooleanLiteralOperatorsi  z'
Test operators with Boolean constants
c                  a	a
 V	3R  lpV
3R lpR p\         P                  ! RR.^R7       F6  w  o	p\        RR7      ! V4      pV P                  V! V4      V! V4      4       K8  	  \         P                  ! RR.^R7       F6  w  po
\        RR7      ! V4      pV P                  V! V4      V! V4      4       K8  	  \        RR7      ! V4      pV P                  V! 4       V! 4       4       R# )c                    < SV 8H  # r   r   rI  a_vals   &r   r  7TestBooleanLiteralOperators.test_eq.<locals>.test_impl1      A:r   c                    < V S8H  # r   r   rH  b_vals   &r   r  7TestBooleanLiteralOperators.test_eq.<locals>.test_impl2      :r   c                  2    R R 8H  p R R8H  pRR 8H  pRR8H  pWW#3# TFr   r1r2r3r4s       r   
test_impl37TestBooleanLiteralOperators.test_eq.<locals>.test_impl3  1    BB$B%BB##r   TFrepeatr  Nr1  r2  r   ra  r6  r  r  r  rI  r  rH  r  cfunc3r  r  s   &        @@r   r  #TestBooleanLiteralOperators.test_eq      			$ "))4-BHE1$'
3FZ]F1I6 C "))4-BHAu$'
3FZ]F1I6 C d#J/vx0r   c                  a	a
 V	3R  lpV
3R lpR p\         P                  ! RR.^R7       F6  w  o	p\        RR7      ! V4      pV P                  V! V4      V! V4      4       K8  	  \         P                  ! RR.^R7       F6  w  po
\        RR7      ! V4      pV P                  V! V4      V! V4      4       K8  	  \        RR7      ! V4      pV P                  V! 4       V! 4       4       R# )c                    < SV 8g  # r   r   r  s   &r   r  7TestBooleanLiteralOperators.test_ne.<locals>.test_impl1  r  r   c                    < V S8g  # r   r   r  s   &r   r  7TestBooleanLiteralOperators.test_ne.<locals>.test_impl2  r  r   c                  2    R R 8g  p R R8g  pRR 8g  pRR8g  pWW#3# r  r   r  s       r   r  7TestBooleanLiteralOperators.test_ne.<locals>.test_impl3  r  r   TFr  r  Nr  r  s   &        @@r   test_ne#TestBooleanLiteralOperators.test_ne  r  r   c                  a V3R  lpR p\         P                  ! RR.^R7       F6  w  op\        RR7      ! V4      pV P                  V! V4      V! V4      4       K8  	  \        RR7      ! V4      pV P                  V! 4       V! 4       4       R# )c                    < SV J # r   r   r  s   &r   r  7TestBooleanLiteralOperators.test_is.<locals>.test_impl13  s    A:r   c                  *    R R J p R RJ pRR J pRRJ pWW#3# r  r   r  s       r   r  7TestBooleanLiteralOperators.test_is.<locals>.test_impl26  s1    BB$B%BB##r   TFr  r  Nr  )r6  r  r  rI  r  r  r  s   &     @r   test_is#TestBooleanLiteralOperators.test_is1  s{    		$ "))4-BHE1$'
3FZ]F1I6 C d#J/vx0r   c                h    R  p\        RR7      ! V4      pV P                  V! 4       V! 4       4       R# )c                  $    R RrV '       * V'       * 3# r  r   rM  s     r   	test_impl7TestBooleanLiteralOperators.test_not.<locals>.test_implF  s    $qEq5>!r   Tr  Nr  r6  r  r=  s   &  r   r  $TestBooleanLiteralOperators.test_notD  s,    	" T"9-eg.r   c                h    R  p\        RR7      ! V4      pV P                  V! 4       V! 4       4       R# )c                  4    R Rr\        V 4      \        V4      3# r  )boolrM  s     r   r  8TestBooleanLiteralOperators.test_bool.<locals>.test_implO  s    $qGT!W%%r   Tr  Nr  r  s   &  r   	test_bool%TestBooleanLiteralOperators.test_boolM  s,    	& T"9-eg.r   c                h    R  p\        RR7      ! V4      pV P                  V! 4       V! 4       4       R# )c                  4    R Rr\        V 4      \        V4      3# r  )r  rM  s     r   r  ?TestBooleanLiteralOperators.test_bool_to_str.<locals>.test_implX  s    $qFCF##r   Tr  Nr  r  s   &  r   test_bool_to_str,TestBooleanLiteralOperators.test_bool_to_strV  s,    	$ T"9-eg.r   r   N)r   r   r   r   r  r  r  r  r  r  r  r   r   r   s   @r   r  r    s-     14141&/// /r   r  __main__)&r3  r1  r   unittestnumpyrF  numbar   r   
numba.corer   r   r   numba.core.types.functionsr   numba.tests.supportr	   r
   r   numba.tests.matmul_usecaser   r   r   ro  r  r   objectr   r   r(  r  r  r  r  r  r  r   mainr   r   r   <module>r
     s          + + 3 9 95 5 t
& h& hV`"V `"Fo(H o(d &@OH @OF -  
")h ")H1 1@d/( d/N zMMO r   