+
    ;i~p                     f   ^ RI t ^ RIt^ RIt^ RIHtHtHtHtH	t	H
t
Ht ^ RIHt ^ RIHt ^ RIHtHt 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8X  d   ] P<                  ! 4        R# R# )    N)voidfloat32float64int32int64jitguvectorize)TypingError)GUVectorize)TestCaseMemoryLeakMixinc           
        V P                   w  r4VP                   w  rE\        V4       FZ  p\        V4       FH  p^ W&V3&   \        V4       F0  pW&V3;;,          WV3,          WV3,          ,          ,          uu&   K2  	  KJ  	  K\  	  R# )zdocstring for matmulcoreN)shaperange)	ABCmnpijks	   &&&      ^/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/npyufunc/test_gufunc.py
matmulcorer      sn    77DA77DA1XqAAdG1XQ$1T7Q!tW,,       c                 *    W,          V,           V^ &   R# r   N )axyouts   &&&&r   axpyr$      s    UaZCFr   c                   H   a  ] tR t^t o RtR tR tR tR tR t	R t
RtV tR	# )

TestGUFunccpuc                   R p\         P                  ! V^,          ^,          \         P                  R7      P                  V^^4      p\         P                  ! V^,          ^,          \         P                  R7      P                  V^^4      pV! W44      p\         P                  ! W44      p\         P
                  P                  WVRRR7       R# i  dtypeh㈵>:0yE>rtolatolNnparanger   reshapematmultestingassert_allclose)selfgufunc	matrix_ctr   r   r   Golds   &&     r   check_matmul_gufuncTestGUFunc.check_matmul_gufunc   s    	IIi!ma'rzz:BB9aQRSIIi!ma'rzz:BB9aQRS1Lyy


""1D"Ar   c                    \        \        R V P                  R7      pVP                  \        R,          \        R,          \        R,          34       VP                  4       pV P                  V4       R# )(m,n),(n,p)->(m,p)targetNNNNrC   )r   r   rA   addr   build_ufuncr<   r8   r9   s   & r   test_gufuncTestGUFunc.test_gufunc(   sS    Z)=$(KK1

GDM74='$-@A##%  (r   c                    \        \        \        R,          \        R,          \        R,          4      .RV P                  R7      ! \        4      pV P                  V4       R# )rC   r?   r@   NrB   )r	   r   r   rA   r   r<   rF   s   & r   test_guvectorize_decor!TestGUFunc.test_guvectorize_decor0   sH    d73<ws|LM1$(KK11;= 	  (r   c                8   \        \        R V P                  R7      pVP                  R4       VP	                  4       p\
        P                  ! ^
\
        P                  R7      pV! W"V4      p\
        P                  P                  W2V,          V,           4       R# )(), (), () -> ()r@   z(intp, intp, intp, intp[:])r*   N)
r   r$   rA   rD   rE   r2   r3   intpr6   assert_equal)r8   r9   r!   r#   s   &   r   test_ufunc_likeTestGUFunc.test_ufunc_like7   sk     T#5dkkJ

01##%IIb(Q1o


UQY/r   c                X   \        R .R4      R 4       p\        P                  ! R4      pV! V^ R7      p\        P                  ! V^ R7      p\        P                  P                  W44       \        P                  ! V4      pV! W%^ R7       \        P                  P                  WT4       R# )zf8[:],f8[:](n)->(n)c                 v    ^ p\        V P                  ^ ,          4       F  pW V,          ,          pW!V&   K  	  R# r   r   r   r!   resaccr   s   &&  r   	my_cumsum'TestGUFunc.test_axis.<locals>.my_cumsumF   0    C1771:&tA 'r   axisr#   r]   N      )r	   r2   onescumsumr6   rO   
zeros_like)r8   rY   r!   r"   expectedout_kws   &     r   	test_axisTestGUFunc.test_axisD   s    	m_j	1	 
2	 GGHaa 99QQ'


,q!!a(


1r   c                F   \        \        R ,          \        \        R ,          3.R4      R 4       pV P                  RVP                  4       V P                  RVP                  4       V P                  RVP
                  4       V P                  RVP                  4       R# )rC   (n),()->(n)c                n    \        V P                  ^ ,          4       F  pW,          V,           W#&   K  	  R# )docstring for gufuncNrU   r!   r"   rW   r   s   &&& r   r9   )TestGUFunc.test_docstring.<locals>.gufuncX   (     1771:& 'r   z numba.tests.npyufunc.test_gufuncr9   z)TestGUFunc.test_docstring.<locals>.gufuncrl   N)r	   r   assertEqual
__module____name____qualname____doc__rF   s   & r   test_docstringTestGUFunc.test_docstringW   s    	uQxa12M	B	" 
C	"
 	;V=N=NO6??3DfFYFYZ/@r   r   N)rr   rq   rs   __firstlineno__rA   r<   rG   rJ   rP   rg   ru   __static_attributes____classdictcell____classdict__s   @r   r&   r&      s0     FB))02&
A 
Ar   r&   c                   <   a  ] tR t^dt o RtR tR tR tR tRt	V t
R# )TestMultipleOutputsr'   c                   \        R V P                  R7      R 4       p\        P                  ! ^
\        P                  R7      ^,           p\        P
                  ! V4      p\        P
                  ! V4      pV! W#V4       \        P                  P                  W#4       \        P                  P                  W$4       R# )(x)->(x),(x)r@   c                 f    \        VP                  4       F  pW,          W&   W,          W#&   K  	  R # Nr   sizer   r   r   r   s   &&& r   copyKTestMultipleOutputs.test_multiple_outputs_same_type_passed_in.<locals>.copyh   s(     166]tt #r   r*   Nr	   rA   r2   r3   r   rd   r6   r7   )r8   r   r   r   r   s   &    r   )test_multiple_outputs_same_type_passed_in=TestMultipleOutputs.test_multiple_outputs_same_type_passed_ing   s    	^ KK
)	
)	
 IIb

+a/MM!MM!Q1


""1(


""1(r   c                   \        R V P                  R7      R 4       p\        P                  ! ^
\        P                  R7      ^,           p\        P
                  ! V4      p\        P
                  ! V4      pV! W#V4       \        P                  P                  W#4       \        P                  P                  V^,          V4       R# )r   r@   c                 t    \        VP                  4       F  pW,          W&   W,          ^,          W#&   K   	  R# )   Nr   r   s   &&& r   copy_and_doubleRTestMultipleOutputs.test_multiple_outputs_distinct_values.<locals>.copy_and_doublex   s,     166]ttax #r   r*   Nr   )r8   r   r   r   r   s   &    r   %test_multiple_outputs_distinct_values9TestMultipleOutputs.test_multiple_outputs_distinct_valuesv   s    	^ KK
)	 
)	 
 IIb

+a/MM!MM!a 


""1(


""1q5!,r   c                   \        R V P                  R7      R 4       p\        P                  ! ^
\        P                  R7      ^,           p\        P
                  ! V4      p\        P
                  ! V\        P                  R7      pV! W#V4       \        P                  P                  W#4       \        P                  P                  V\        P                  ! R4      ,          V4       R# )r   r@   c                 t    \        VP                  4       F  pW,          W&   W,          R ,          W#&   K   	  R# )      ?Nr   r   s   &&& r   copy_and_multiplyJTestMultipleOutputs.test_multiple_output_dtypes.<locals>.copy_and_multiply   s,     166]ttcz #r   r*   r   N)	r	   rA   r2   r3   r   rd   r   r6   r7   )r8   r   r   r   r   s   &    r   test_multiple_output_dtypes/TestMultipleOutputs.test_multiple_output_dtypes   s    	^ KK
)	"
)	"
 IIb)A-MM!MM!2::.!"


""1(


""1rzz##6:r   c           	     ,   \        R V P                  R7      R 4       p\        P                  ! ^\        P                  R7      pRpV P                  \        4      ;_uu_ 4       pV! V4       RRR4       V P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! W"W"V4       RRR4       V P                  V\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)z(m),(m)->(m),(m)r@   c                     R # r   r   )r!   r"   zws   &&&&r   f@TestMultipleOutputs.test_incorrect_number_of_pos_args.<locals>.f       r   r*   z"Too few arguments for function 'f'N)
r	   rA   r2   r3   r   assertRaises	TypeErrorassertInstr	exception)r8   r   arrmsgtes   &    r   !test_incorrect_number_of_pos_args5TestMultipleOutputs.test_incorrect_number_of_pos_args   s    	'	<	 
=	 ii* 3y))RcF *c3r||,- y))Rc#& *c3r||,- *)
 *)s   #	C06D0D 	D	r   N)rr   rq   rs   rw   rA   r   r   r   r   rx   ry   rz   s   @r   r}   r}   d   s#     F)- ; . .r   r}   c                       ] tR t^tRtRtRtR# )TestGUFuncParallelFparallelr   Nrr   rq   rs   rw   _numba_parallel_test_rA   rx   r   r   r   r   r          !Fr   r   c                   H   a  ] tR t^t o RtR tR tR tR tR t	R t
RtV tR	# )
TestDynamicGUFuncr'   c                   R  p\        \        RV P                  RR7      p^
p\        P                  ! V^,          ^,          \        P
                  R7      P                  V^^4      p\        P                  ! V^,          ^,          \        P
                  R7      P                  V^^4      p\        P                  ! V^,          ^,          \        P
                  R7      P                  V^^4      pV! W$WV4       \        P                  ! V^,          ^,          \        P                  R7      P                  V^^4      p\        P                  ! V^,          ^,          \        P                  R7      P                  V^^4      p\        P                  ! V^,          ^,          \        P                  R7      P                  V^^4      p	V! W'W4       V P                  \        VP                  4      ^4       R# )c                     \         P                  ! W4      pV ! WV4       \         P                  P                  W4R RR7       R# )r,   r-   r.   N)r2   r5   r6   r7   )r9   r   r   r   r;   s   &&&& r   r<   BTestDynamicGUFunc.test_dynamic_matmul.<locals>.check_matmul_gufunc   s1    99Q?D1OJJ&&qT&Er   r?   TrA   
is_dynamicr*   N)r   r   rA   r2   r3   r   r4   r   rp   lentypes)
r8   r<   r9   r:   Ai64Bi64Ci64r   r   r   s
   &         r   test_dynamic_matmul%TestDynamicGUFunc.test_dynamic_matmul   sc   	F
 Z)=$(KKDB	yyQ*"((;CCIqRSTyyQ*"((;CCIqRSTyyQ*"((;CCIqRSTF$5IIi!ma'rzz:BB9aQRSIIi!ma'rzz:BB9aQRSIIi!ma'rzz:BB9aQRSFq,V\\*A.r   c                    R  p\        \        RV P                  RR7      p\        P                  ! ^
\        P
                  R7      pV! W#4       R# )c                 N   \         P                  ! ^
VP                  R7      p\         P                  ! ^
VP                  R7      pV ! WW4       V ! WWR7       W,          V,           p\         P                  P	                  W$4       \         P                  P	                  W44       R# )
   r*   r#   N)r2   zerosr+   r6   rO   )r9   r!   r#   rf   goldens   &&   r   check_ufunc_outputETestDynamicGUFunc.test_dynamic_ufunc_like.<locals>.check_ufunc_output   sm    ((2QWW-CXXb0F1 1'UQYFJJ##C0JJ##F3r   rM   Tr   r*   N)r   r$   rA   r2   r3   rN   )r8   r   r9   r!   s   &   r   test_dynamic_ufunc_like)TestDynamicGUFunc.test_dynamic_ufunc_like   s=    	4 T#5dkk(,.IIb(6%r   c                h   \        RV P                  RR7      R 4       pV P                  VP                  4       \        P
                  ! R\        P                  R7      P                  R^4      p\        P                  ! R\        P                  R7      pV! W#4       \        VP                  ^ ,          4       F/  pV P                  W4,          W$,          P                  4       4       K1  	  RpV P                  \        V4      ;_uu_ 4        V! V4       R	R	R	4       R	#   + '       g   i     R	# ; i)
_
Note that scalar output is a 0-dimension array that acts as
a pointer to the output location.
(n)->()TrA   nopythonc                 v    R p\        V P                  ^ ,          4       F  pW V,          ,          pK  	  W!R&   R# g        Nr   rU   inpr#   tmpr   s   &&  r   sum_row=TestDynamicGUFunc.test_dynamic_scalar_output.<locals>.sum_row   s0    C399Q<(1v )Gr   0u  r*   '  z)Too few arguments for function 'sum_row'.N)r	   rA   
assertTruer   r2   r3   r   r4   r   r   r   rp   sumassertRaisesRegexr   )r8   r   r   r#   r   r   s   &     r   test_dynamic_scalar_output,TestDynamicGUFunc.test_dynamic_scalar_output   s     
Yt{{T	B	 
C	 	**+iiRXX.66ua@hhuBHH- syy|$ASVSVZZ\2 % :##Is33CL 4333s   	D  D1	c                   \        R 4      R 4       p\        P                  ! R4      p\        P                  ! V^ R7      p\        P                  ! V4      pV! W$^ R7       \        P
                  P                  WC4       \        P                  ! V4      pV! W%^ R7       \        P
                  P                  WS4       R# )rS   c                 v    ^ p\        V P                  ^ ,          4       F  pW V,          ,          pW!V&   K  	  R# r   rU   rV   s   &&  r   rY   .TestDynamicGUFunc.test_axis.<locals>.my_cumsum   r[   r   r\   r^   Nr_   )r	   r2   rb   rc   rd   r6   rO   )r8   rY   r!   re   r"   rf   s   &     r   rg   TestDynamicGUFunc.test_axis   s    	Z	 	 
!	 GGH99QQ'MM(#!Q


,q!!a(


1r   c                    \        R 4      R 4       p. ROpV F%  p\        W4      pV P                  VRV: R24       K'  	  \        P                  ! . RO4      p\        P                  ! . R	O4      pV! WV4       V P                  V\        P                  ! . R
O4      4       V P                  VP                  R 4       V P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  \        XP                  4      R4       V P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  \        VP                  4      R4       V P                  \        4      ;_uu_ 4       pVP                  V^ ^.4       RRR4       V P                  \        VP                  4      R4       V P                  \        4      ;_uu_ 4       pVP!                  WU4       RRR4       V P                  \        VP                  4      R4       R#   + '       g   i     ELO; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     Lr; i)rS   c                 v    ^ p\        V P                  ^ ,          4       F  pW V,          ,          pW!V&   K  	  R# r   rU   rV   s   &&  r   r9   8TestDynamicGUFunc.test_gufunc_attributes.<locals>.gufunc  r[   r   zdynamic gufunc not exporting ""Nz-Reduction not defined on ufunc with signaturez?method outer is not allowed in ufunc with non-trivial signature)	signature
accumulateatouterreducereduceat   r         r   r   r   r   r   r      r   )r	   hasattrr   r2   arrayassertPreciseEqualrp   r   r   RuntimeErrorr   r   r   r   r   r   r   )r8   r9   attrsattrcontainsr    rW   raisess   &       r   test_gufunc_attributes(TestDynamicGUFunc.test_gufunc_attributes  s   	Z	 	 
!	 QDv,HOOHT&ST  HH\"hh|$qRXXm%<=
 	)):6|,,a  -V--.0_`|,,MM! -V--.0_`|,,OOA1v& -V--.0_`y))VLL *V--.0qr -,, -,, -, *)s0   H26II1I-2I	I	I*	-I=	c                   \        R 4      R 4       pV P                  VP                  4       \        P                  ! . RO4      p\        P                  ! . RO4      p\        P                  ! . RO4      pV! W#V4       V P                  V\        P                  ! . RO4      4       V P                  VP                  4       V P                  VP                  V4      ^
4       V P                  VP                  V4      \        P                  ! . RO4      4       V P                  VP                  ^ ^.^^.4      \        P                  ! ^^.^^..4      4       V P                  VP                  V^ ^.4      \        P                  ! ^^.4      4       \        P                  ! . RO4      p\        P                  ! ^^.4      pVP                  V^ ^.V4       V P                  V\        P                  ! . RO4      4       R# )	z	(),()->()c                     W,           V^ &   R# r   r   r!   r"   rW   s   &&&r   rD   6TestDynamicGUFunc.test_gufunc_attributes2.<locals>.add7  s    UCFr   Nr   )r   r   r   r   r   )   r   r   r   r   )r   r   r   r   )r	   assertIsNoner   r2   r   r   rp   r   r   r   r   r   )r8   rD   r    brW   r!   r"   s   &      r   test_gufunc_attributes2)TestDynamicGUFunc.test_gufunc_attributes26  sz   	[	!	 
"	 	#--(HH\"HH\"hh|$A#RXXl%;< 	#--(A+q 1288M3JK		1a&1a& 9288aVaQRVDT;UVQA 71a&9IJHH\"HHaVq1a&!288L#9:r   r   N)rr   rq   rs   rw   rA   r   r   r   rg   r   r   rx   ry   rz   s   @r   r   r      s/     F/.&(<2(&sP; ;r   r   c                   F   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
# )TestGUVectorizeScalariQ  z4
Nothing keeps user from out-of-bound memory access
r'   c                `   \        R.RV P                  RR7      R 4       p\        P                  ! R\        P                  R7      P                  R^4      pV! V4      p\        VP                  ^ ,          4       F/  pV P                  W4,          W$,          P                  4       4       K1  	  R	# )
r   zvoid(int32[:], int32[:])r   Tr   c                 v    R p\        V P                  ^ ,          4       F  pW V,          ,          pK  	  W!R&   R# r   rU   r   s   &&  r   r   9TestGUVectorizeScalar.test_scalar_output.<locals>.sum_row]  s2     C399Q<(1v )Gr   r   r*   r   N)
r	   rA   r2   r3   r   r4   r   r   rp   r   )r8   r   r   r#   r   s   &    r   test_scalar_output(TestGUVectorizeScalar.test_scalar_outputW  s     
019 KK$
8	
8	 iiRXX.66ua@cl syy|$ASVSVZZ\2 %r   c                    \        R .RV P                  RR7      R 4       p\        P                  ! ^\        P                  R7      P                  ^
^4      pV! V^4      pV P                  V^,          V4       R# )zint32[:], int32[:], int32[:]rj   Tr   c                 |    \        V P                  ^ ,          4       F  pW,          V^ ,          ,          W#&   K  	  R# r   rU   r   r   r#   r   s   &&& r   foo4TestGUVectorizeScalar.test_scalar_input.<locals>.foor  s,     399Q<(!A$ )r   r*   N)r	   rA   r2   r3   r   r4   r   )r8   r  r   r#   s   &   r   test_scalar_input'TestGUVectorizeScalar.test_scalar_inputp  sn    	45} KK$
8	'
8	' iibhh/77A>#qk 	a-r   c                   R  p\        R.RV P                  R7      ! V4      p\        P                  ! ^
4      P	                  \        P
                  4      pV! V^4      p\        P                  ! V4      pV! V^V4       \        P                  P                  WE4       \        P                  ! ^4      P	                  \        P
                  4      P                  ^
^4      pV! V^4      p\        P                  ! V4      p\        VP                  ^ ,          4       F  pV! W6,          ^WV,          4       K  	  \        P                  P                  WE4       R# )c                 n    \        V P                  4       F  pWV,          ^,           ,          W#&   K  	  R# )r   Nr   r  s   &&& r   pyfuncATestGUVectorizeScalar.test_scalar_input_core_type.<locals>.pyfunc  s&    388_!fqj) %r   int32[:], int32, int32[:]rj   r@   N)r	   rA   r2   r3   astyper   rd   r6   rO   r4   r   r   )r8   r  	my_gufuncr   gotre   axs   &      r   test_scalar_input_core_type1TestGUVectorizeScalar.test_scalar_input_core_type  s   	*  !< = -'+{{44:<	
 iim""288,Q==%sAx 


. iim""288,44R;Q==%q)*B37Ax|, + 	

.r   c                    V P                  \        4      ;_uu_ 4       p\        R .RV P                  R7      R 4       pRRR4       V P	                  R\        XP                  4      4       R#   + '       g   i     L7; i)r  z(n),(n)->(n)r@   c                     R # r   r   )r    r   cs   &&&r   r  GTestGUVectorizeScalar.test_scalar_input_core_type_error.<locals>.pyfunc       r   Nz2scalar type int32 given for non scalar argument #2r   r   r	   rA   rp   r   r   r8   r   r  s   &  r   !test_scalar_input_core_type_error7TestGUVectorizeScalar.test_scalar_input_core_type_error  sj    y))V56 $-- *
 	MV--.	0 *)    A--A=	c                    V P                  \        4      ;_uu_ 4       p\        R .RV P                  R7      R 4       pRRR4       V P	                  R\        XP                  4      4       R#   + '       g   i     L7; i)zint32[:], int32[:]z
(m,n)->(n)r@   c                     R # r   r   )r    r   s   &&r   r  8TestGUVectorizeScalar.test_ndim_mismatch.<locals>.pyfunc  r  r   Nz,type and shape signature mismatch for arg #1r   r!  s   &  r   test_ndim_mismatch(TestGUVectorizeScalar.test_ndim_mismatch  sj    y))V./ $-- *
 	GV--.	0 *)r$  r   N)rr   rq   rs   rw   rt   rA   r  r  r  r"  r(  rx   ry   rz   s   @r   r  r  Q  s/      F32./800 0r   r  c                       ] tR tRtRtRtRtR# )TestGUVectorizeScalarParalleli  Fr   r   Nr   r   r   r   r+  r+    r   r   r+  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestGUVectorizePicklingi  c                   \        R.R4      R 4       p\        P                  ! V4      p\        P                  ! V4      pV P	                  VP
                  VP
                  4       V P	                  VP                  VP                  4       V P	                  VP                  VP                  4       V P	                  VP                  P                  VP                  P                  4       V P                  VP
                  4       VP                  4        V P                  VP
                  4       V P                  V! R4      V! R4      4       \        P                  ! ^
4      pV P                  V! V4      V! V4      4       R# )zNon-dynamic gufunc.
        zf8,f8[:]()->()c                     V ^,          VR&   R# r   rC   Nr   r!   r#   s   &&r   doubleFTestGUVectorizePickling.test_pickle_gufunc_non_dyanmic.<locals>.double      UCFr         ?N)r	   pickledumpsloadsrp   _frozenidentityr   gufunc_builder_sigsr   disable_compiler   r2   r3   )r8   r3  serclonedr   s   &    r   test_pickle_gufunc_non_dyanmic6TestGUVectorizePickling.test_pickle_gufunc_non_dyanmic  s#    
j\8	,	 
-	 ll6"c" 	8&//:**F,=,=>..44..44	6 	' ' 	sVC[9iimsVC[9r   c                ~   \        R^R7      R 4       p\        P                  ! V4      p\        P                  ! V4      pV P	                  VP
                  VP
                  4       V P	                  VP                  VP                  4       V P	                  VP                  VP                  4       V P	                  VP                  P                  VP                  P                  4       V P                  VP
                  4       \        P                  ! ^4      p\        P                  ! ^4      pV! RVR7       V! RVR7       V P                  WE4       \        P                  ! ^
4      p\        P                  ! V4      p\        P                  ! V4      pV! WdR7       V! WeR7       V P                  WE4       R# )z:Dynamic gufunc w/o prepopulating before pickling.
        r/  r;  c                     V ^,          VR&   R# r1  r   r2  s   &&r   r3  LTestGUVectorizePickling.test_pickle_gufunc_dyanmic_null_init.<locals>.double  r5  r   r6  r   N)r	   r7  r8  r9  rp   r:  r;  r   r<  r=  assertFalser2   r   r   r3   rd   )r8   r3  r?  r@  expectr  r   s   &      r   $test_pickle_gufunc_dyanmic_null_init<TestGUVectorizePickling.test_pickle_gufunc_dyanmic_null_init  sM    
X	*	 
+	 ll6"c" 	8&//:**F,=,=>..44..44	6 	( !hhqkss,iims#mmC ss,r   c                   \        R^R7      R 4       p\        P                  ! ^4      p\        P                  ! ^4      pV! RVR7       \        P                  ! ^
4      p\        P                  ! V4      p\        P                  ! V4      pV! WBR7       \
        P                  ! V4      p\
        P                  ! V4      pV P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  P                  VP                  P                  4       V P                  VP                  4       VP                  4        V P!                  VP                  4       \        P                  ! ^4      p\        P                  ! ^4      pV! RVR7       V! RVR7       V P#                  W#4       \        P                  ! V4      p\        P                  ! V4      pV! WBR7       V! WCR7       V P#                  W#4       R# )zDynamic gufunc prepopulated before pickling.

Once unpickled, we disable compilation to verify that the gufunc
compilation state is carried over.
r/  rD  c                     V ^,          VR&   R# r1  r   r2  s   &&r   r3  NTestGUVectorizePickling.test_pickle_gufunc_dynamic_initialized.<locals>.double  r5  r   r6  r   N)r	   r2   r   r3   rd   r7  r8  r9  rp   r:  r;  r   r<  r=  rG  r>  r   r   )r8   r3  rH  r  r   r?  r@  s   &      r   &test_pickle_gufunc_dynamic_initialized>TestGUVectorizePickling.test_pickle_gufunc_dynamic_initialized  s    
X	*	 
+	 !hhqksiims#mmC s ll6"c" 	8&//:**F,=,=>..44..44	6 	( 	 '!hhqkss,s#mmC ss,r   r   N)	rr   rq   rs   rw   rA  rI  rN  rx   ry   rz   s   @r   r-  r-    s     :: -D/- /-r   r-  c                      a  ] tR tRt o RtR tR tR tR t]	P                  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RtV tR# )TestGUVectorizeJiti%  r'   c                  a \        R R7      V3R l4       p\        P                  ! ^(RR7      P                  ^^^4      p\        P                  ! ^d4      p\        P
                  ! V4      pV! W4V4       V P                  WSV,           4       R# )Tr   c                    < S! WV4       R # r   r   r!   r"   rW   r9   s   &&&r   jit_add4TestGUVectorizeJit.check_add_gufunc.<locals>.jit_add)      1r   i8r*   N)r   r2   r3   r4   r   rd   r   )r8   r9   rV  r!   r"   rW   s   &f    r   check_add_gufunc#TestGUVectorizeJit.check_add_gufunc(  sr    	d		 
	 IIb%--aA6HHSMmmAcU+r   c                d    \        R RV P                  R7      R 4       pV P                  V4       R# )int64[:], int64, int64[:]rj   r@   c                 n    \        V P                  ^ ,          4       F  pW,          V,           W#&   K  	  R# r   rU   rm   s   &&& r   rD   /TestGUVectorizeJit.test_add_static.<locals>.add4  ro   r   Nr	   rA   rZ  r8   rD   s   & r   test_add_static"TestGUVectorizeJit.test_add_static3  s5    	0- KK
)	"
)	" 	c"r   c                d    \        R RV P                  R7      R 4       pV P                  V4       R# )r]  rj   r@   c                 n    \        V P                  ^ ,          4       F  pW,          V,           W#&   K  	  R# r   rU   rm   s   &&& r   rD   9TestGUVectorizeJit.test_add_static_cast_args.<locals>.add>  ro   r   Nr`  ra  s   & r   test_add_static_cast_args,TestGUVectorizeJit.test_add_static_cast_args<  s5    	0- KK
)	"
)	" 	c"r   c                b    \        R V P                  R7      R 4       pV P                  V4       R# )rj   r@   c                 n    \        V P                  ^ ,          4       F  pW,          V,           W#&   K  	  R# r   rU   rm   s   &&& r   rD   0TestGUVectorizeJit.test_add_dynamic.<locals>.addG  &    1771:& 'r   Nr`  ra  s   & r   test_add_dynamic#TestGUVectorizeJit.test_add_dynamicF  s/    	]4;;	7	" 
8	" 	c"r   c                d    \        R V P                  RR7      R 4       pV P                  V4       R# )rj   T)rA   forceobjc                 n    \        V P                  ^ ,          4       F  pW,          V,           W#&   K  	  R# r   rU   rm   s   &&& r   rD   0TestGUVectorizeJit.test_object_mode.<locals>.addP  rl  r   Nr`  ra  s   & r   test_object_mode#TestGUVectorizeJit.test_object_modeN  s2    	]4;;	F	" 
G	" 	c"r   c                *   R p\         P                  ! V^,          ^,          \         P                  R7      P                  V^^4      p\         P                  ! V^,          ^,          \         P                  R7      P                  V^^4      p\         P                  ! V^,          ^,          \         P                  R7      P                  V^^4      pV! W4V4       \         P                  ! W44      p\         P
                  P                  WVRRR7       R# r)   r1   )r8   jit_funcr:   r   r   r   r;   s   &&     r   check_matmulTestGUVectorizeJit.check_matmulW  s    	IIi!ma'rzz:BB9aQRSIIi!ma'rzz:BB9aQRSIIi!ma'rzz:BB9aQRSqyy


""1D"Ar   c                   a \        R V P                  R7      ! \        4      o\        RR7      V3R l4       pV P	                  V4       R# )r?   r@   TrS  c                    < S! WV4      # r   r   )r   r   r   r9   s   &&&r   
matmul_jit<TestGUVectorizeJit.test_njit_matmul_call.<locals>.matmul_jitg  s    !?"r   N)r	   rA   r   r   rw  )r8   r{  r9   s   & @r   test_njit_matmul_call(TestGUVectorizeJit.test_njit_matmul_callb  sH    1$(KK11;= 
d		# 
	# 	*%r   c                4  a \        \        R V P                  RR7      o\        RR7      V3R l4       p\        P
                  ! ^
\        P                  R7      p\        P                  ! V4      pV! W"W#4       V P                  W2V,          V,           4       R# )z(),(),() -> ()Tr   rS  c                    < S! WW#4       R # r   r   )r    r!   r"   r#   r9   s   &&&&r   axpy_jit.TestGUVectorizeJit.test_axpy.<locals>.axpy_jitq  s    1 r   r*   N)	r   r$   rA   r   r2   r3   rN   rd   r   )r8   r  r!   r#   r9   s   &   @r   	test_axpyTestGUVectorizeJit.test_axpym  sx    T#3DKK(,. 
d		! 
	! IIb(mmAqUQY/r   c                v  a \        R 4      R 4       o\        RR7      V3R l4       p\        P                  ! ^(RR7      P	                  ^^
4      p\        P                  ! ^RR7      p\        P
                  ! ^RR7      pV! W#V4       \        P                  ! V4      pS! W#V4       V P                  WE4       R# )z(n),(m) -> ()c                 V    V P                  4       VP                  4       ,           V^ &   R# r   )r   r   s   &&&r   r9   5TestGUVectorizeJit.test_output_scalar.<locals>.gufunc|  s    UUWquuw&CFr   TrS  c                    < S! WV4       R # r   r   rU  s   &&&r   rv  7TestGUVectorizeJit.test_output_scalar.<locals>.jit_func  rX  r   rY  r*   N)r	   r   r2   r3   r4   r   rd   r   )r8   rv  r!   r"   rW   re   r9   s   &     @r   test_output_scalar%TestGUVectorizeJit.test_output_scalarz  s    	_	%	' 
&	' 
d		 
	 IIb%--a4IIb%hhq%s==%qX.r   c                @  a \        R 4      R 4       o\        RR7      V3R l4       p\        P                  ! ^(RR7      P	                  ^^^4      p\        P
                  ! V4      pV! W#4       \        P
                  ! V4      pS! W$4       V P                  W44       R# )z() -> ()c                     V ^d,           V^ &   R# )d   Nr   )r!   rW   s   &&r   r9   4TestGUVectorizeJit.test_input_scalar.<locals>.gufunc  s    WCFr   TrS  c                    < S! W4       R # r   r   )r!   rW   r9   s   &&r   rv  6TestGUVectorizeJit.test_input_scalar.<locals>.jit_func  s
    1Nr   rY  r*   N)r	   r   r2   r3   r4   rd   r   )r8   rv  r!   rW   re   r9   s   &    @r   test_input_scalar$TestGUVectorizeJit.test_input_scalar  s    	Z	 	 
!	 
d		 
	 IIb%--aA6mmA==%q.r   c                  a R p\        V4      R 4       o\        RR7      V3R l4       p^^rC\        P                  ! V^,          4      P	                  W34      p\        P                  ! V^,          4      P	                  W3V4      p\        P                  ! V4      p\        P                  ! V^,          4      P	                  W34      pV P                  \        4      ;_uu_ 4       p	\        P                  ! W3,          4      p
V! WWx4       RRR4       RV R2pV P                  V\        X	P                  4      4       V P                  \        4      ;_uu_ 4       p	\        P                  ! W3,          4      P	                  W34      pV! W\Wx4       RRR4       RV R	2pV P                  V\        V	P                  4      4       V P                  \        4      ;_uu_ 4       p	\        P                  ! ^4      pV! WVW4       RRR4       R
V R2pV P                  V\        V	P                  4      4       V P                  \        4      ;_uu_ 4       p	\        P                  ! V4      pV! WVW~4       RRR4       RV R2pV P                  V\        V	P                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL2; i  + '       g   i     L; i  + '       g   i     Lx; i)z (n, m), (n, n, n) -> (m), (n, n)c                     ^{V^ &   RV^ &   R# {   i  Nr   r!   r"   rW   r#   s   &&&&r   bar9TestGUVectorizeJit.test_gufunc_ndim_mismatch.<locals>.bar      CFCFr   TrS  c                    < S! WW#4       R # r   r   r!   r"   rW   r#   r  s   &&&&r   r  9TestGUVectorizeJit.test_gufunc_ndim_mismatch.<locals>.foo      cr   NzXbar: Input operand 0 does not have enough dimensions (has 1, gufunc core with signature z requires 2)zXbar: Input operand 1 does not have enough dimensions (has 2, gufunc core with signature z requires 3)zYbar: Output operand 0 does not have enough dimensions (has 0, gufunc core with signature z requires 1)zYbar: Output operand 1 does not have enough dimensions (has 1, gufunc core with signature )r	   r   r2   r3   r4   r   r
   r   r   r   r   )r8   r   r  NMr!   r"   rW   r#   r   x_r   y_res_out_r  s   &              @r   test_gufunc_ndim_mismatch,TestGUVectorizeJit.test_gufunc_ndim_mismatch  sQ   6		Y		 
 	 
d		  
	  !1IIadO##A)IIadO##A!,iilii1o%%a+ {++v15!Bs  ,009{,Hc3v//01{++v15!))!/Bs  ,009{,Hc3v//01{++v88A;Dd  ,009{,Hc3v//01{++v99Q<Dc  ,009{,Hc3v//015 ,++ ,++ ,+ ,+s0   %&J%5J9  K K %J6	9K
	K	 K0	c                  a
 \        R 4      R 4       o
\        RR7      V
3R l4       p^p^p\        P                  ! ^^V34      p\        P                  ! V34      p\        P                  ! R4      pV P                  \        4      ;_uu_ 4       pS
! WEV4       RRR4       RpV P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       p	V! WEV4       RRR4       RpV P                  V\        X	P                  4      4       R#   + '       g   i     L; i  + '       g   i     LL; i)	(n),(n) -> ()c                     ^{V^ &   R# r  Nr   r   s   &&&r   r  >TestGUVectorizeJit.test_mismatch_inner_dimensions.<locals>.bar      CFr   TrS  c                    < S! WV4       R # r   r   r!   r"   rW   r  s   &&&r   r  >TestGUVectorizeJit.test_mismatch_inner_dimensions.<locals>.foo      cNr   NzxInput operand 1 has a mismatch in its core dimension 0, with gufunc signature (n),(n) -> () (size 3 is different from 2)4Operand has a mismatch in one of its core dimensionsr   r   
r	   r   r2   emptyr   r   
ValueErrorr   r   r   r8   r  r  r  r!   r"   rW   	np_raisesr   r   r  s   &         @r   test_mismatch_inner_dimensions1TestGUVectorizeJit.test_mismatch_inner_dimensions  s   	_	%	 
&	 
d		 
	 HHaAYHHaTNhhv z**icN +Mc3y2234z**fcN +Ec3v//01 +* +*   
D %
D3 D0	3E	c                  a
 \        R 4      R 4       o
\        RR7      V
3R l4       p^p^p\        P                  ! ^^V34      p\        P                  ! V34      p\        P                  ! R4      pV P                  \        4      ;_uu_ 4       pS
! WEV4       RRR4       RpV P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       p	V! WEV4       RRR4       RpV P                  V\        X	P                  4      4       R#   + '       g   i     L; i  + '       g   i     LL; i)	z(n),(m) -> (n)c                     ^{V^ &   R# r  r   r   s   &&&r   r  KTestGUVectorizeJit.test_mismatch_inner_dimensions_input_output.<locals>.bar  r  r   TrS  c                    < S! WV4       R # r   r   r  s   &&&r   r  KTestGUVectorizeJit.test_mismatch_inner_dimensions_input_output.<locals>.foo  r  r   NzzOutput operand 0 has a mismatch in its core dimension 0, with gufunc signature (n),(m) -> (n) (size 3 is different from 2)r  r  r  r  s   &         @r   +test_mismatch_inner_dimensions_input_output>TestGUVectorizeJit.test_mismatch_inner_dimensions_input_output  s   	%	&	 
'	 
d		 
	 HHaAYHHaTNhhv z**icN +Nc3y2234z**fcN +Ec3v//01 +* +*r  c                  a \        R 4      R 4       o\        RR7      V3R l4       p^p^p\        P                  ! V34      p\        P                  ! V34      p\        P                  ! V34      p\        P                  ! V34      pV P                  \        4      ;_uu_ 4       pS! WEWg4       RRR4       Rp	V P                  V	\        XP                  4      4       V P                  \        4      ;_uu_ 4       p
V! WEWg4       RRR4       Rp	V P                  V	\        X
P                  4      4       R#   + '       g   i     L; i  + '       g   i     LL; i)z(n),(m) -> (m),(m)c                     ^{V^ &   RV^ &   R# r  r   r  s   &&&&r   r  ETestGUVectorizeJit.test_mismatch_inner_dimensions_output.<locals>.bar  r  r   TrS  c                    < S! WW#4       R # r   r   r  s   &&&&r   r  ETestGUVectorizeJit.test_mismatch_inner_dimensions_output.<locals>.foo  r  r   Nz~Output operand 0 has a mismatch in its core dimension 0, with gufunc signature (n),(m) -> (m),(m) (size 2 is different from 3)r  r  )r8   r  r  r  r!   r"   rW   r#   r  r   r   r  s   &          @r   %test_mismatch_inner_dimensions_output8TestGUVectorizeJit.test_mismatch_inner_dimensions_output  s   	)	*	 
+	 
d		  
	  HHaTNHHaTNhhtnhhtn z**ic +Rc3y2234z**fc +Ec3v//01 +* +*s   %
D6;
E	6E		E	c                  a \        R 4      R 4       o\        RR7      V3R l4       p^p\        P                  ! ^^^V34      p\        P                  ! ^^V34      p\        P                  ! R4      pV P                  \        4      ;_uu_ 4       pV! W4V4       RRR4       RpV P                  V\        XP                  4      4       R#   + '       g   i     L9; i)r  c                     ^{V^ &   R# r  r   r   s   &&&r   r  8TestGUVectorizeJit.test_mismatch_loop_shape.<locals>.bar  r  r   TrS  c                    < S! WV4       R # r   r   r  s   &&&r   r  8TestGUVectorizeJit.test_mismatch_loop_shape.<locals>.foo#  r  r   N&Loop and array shapes are incompatibler  r  )	r8   r  r  r!   r"   rW   r   r   r  s	   &       @r   test_mismatch_loop_shape+TestGUVectorizeJit.test_mismatch_loop_shape  s    	_	%	 
&	 
d		 
	 HHaAq]#HHaAZ hhvz**fcN +7c3v//01 +*s   
CC	c                  a
 \        R 4      R 4       o
\        V
3R l4       p^p\        P                  ! ^V,          4      P	                  ^V34      p\        P                  ! V4      p\        P
                  ! R4      p\        P                  ! ^V34      pV P                  \        4      ;_uu_ 4       pS
! W4WV4       RRR4       RpV P                  V\        XP                  4      4       V P                  \        4      ;_uu_ 4       p	V! W4WV4       RRR4       RpV P                  V\        X	P                  4      4       R#   + '       g   i     L; i  + '       g   i     LL; i)z(n),(n) -> (), (n)c                     V P                  4       V^ &   \        V P                  ^ ,          4       F2  pW4;;,          W,          VP                  4       ,           ,          uu&   K4  	  R# r   )r   r   r   )r!   r"   rW   r#   r   s   &&&& r   r9   =TestGUVectorizeJit.test_mismatch_loop_shape_2.<locals>.gufunc2  s@    UUWCF1771:&!$.( 'r   c                    < S! WW#4       R # r   r   )r!   r"   rW   r#   r9   s   &&&&r   rv  ?TestGUVectorizeJit.test_mismatch_loop_shape_2.<locals>.jit_func8  s    1"r   Nzoperands could not be broadcast together with remapped shapes [original->remapped]: (4,2)->(4,newaxis) (2,)->() (3,)->(3,newaxis) (3,2)->(3,2)  and requested shape (2)r  )r   )r	   r   r2   r3   r4   r  r   r   r  r   r   r   )r8   rv  r  r!   r"   rW   r#   r  r   r   r9   s   &         @r   test_mismatch_loop_shape_2-TestGUVectorizeJit.test_mismatch_loop_shape_21  s   	)	*	) 
+	)
 
	# 
	# IIacN""Aq6*IIaLhhtnhh1v z**i1" +I 	c3y2234z**fQ3$ +7c3v//01 +* +*s   3
E	
EE	E'	c                \  a \        \        R ,          \        \        R ,          3.R4      R 4       o\        V3R l4       p\        P
                  P                  ^E4      p\        R4       F=  pVP                  ^A4      p\        P                  ! VR,          ^^ R7      pV! V^4       K?  	  R# )rC   rj   c                     R # r   r   )r!   r   rW   s   &&&r   guve1TestGUVectorizeJit.test_issue_10287.<locals>.guveQ  r   r   c                 F   < \         P                  ! V 4      pS! WV4       V# r   )r2   rd   )r!   r   rW   r  s   && r   	njit_guve6TestGUVectorizeJit.test_issue_10287.<locals>.njit_guveV  s    --"CsOJr   i N  Nr\   )	r	   r   r   r   r2   randomdefault_rngr   repeat)r8   r  rng_r!   r"   r  s   &     @r   test_issue_10287#TestGUVectorizeJit.test_issue_10287P  s    	wqz5'!*56	F	 
G	 
	 
	 ii##B'uA

2A		!D'3Q/AaO r   r   N)rr   rq   rs   rw   rA   rZ  rb  rg  rm  unittestexpectedFailurers  rw  r}  r  r  r  r  r  r  r  r  r  r  rx   ry   rz   s   @r   rQ  rQ  %  s{     F	,### # #	B	&0/$/",2\26262:2&2> r   rQ  __main__)r  r7  numpyr2   numbar   r   r   r   r   r   r	   numba.core.errorsr
   numba.np.ufuncr   numba.tests.supportr   r   r   r$   r&   r}   r   r   r  r+  r-  rQ  rr   mainr   r   r   <module>r     s       H H H ) & 9-FA( FARB./8 B.J 
`; `;FZ0OX Z0z$9 
o-ox o-d}( }@
 zMMO r   