+
    :i                        ^ 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HtHt ^ RIHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
I H!t! ^ RIH"t" ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t( ^ RI)H*t*  ! R R4      t+R t, ! R R]4      t- ! R R]P\                  ]P^                  ]4      t0]!Pb                  Pe                  ]04       R# )    N)jittypeof)cgutilstypes	serializesigutilserrors)	is_jittedoverload_attributeoverload_methodregister_jitable	intrinsic)npydecl)AbstractTemplate	signature)tuple_setitem)	_internal)	UfuncBaseUfuncLowererBase)array_analysis)ufuncbuilder)numpy_support)Callable)ir)global_compiler_lockc                   Z   a  ] tR t^t o RR ltR tR tR tR tR t	R t
R	 tR
 tRtV tR# )UfuncAtIteratorNc                Z    Wn         W n        W0n        W@n        WPn        W`n        Wpn        R # N)ufuncaa_tyindices
indices_tybb_ty)selfr    r!   r"   r#   r$   r%   r&   s   &&&&&&&&S/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/np/ufunc/dufunc.py__init__UfuncAtIterator.__init__   s%    
	$	    c                    V P                  W4       V P                  P                  4       w  r4V P                  WV4       V P                  P	                  4        R # r   )_prepareindexerbegin_loops_call_ufunc	end_loops)r'   contextbuilderloop_indices_s   &&&  r(   runUfuncAtIterator.run$   sB    g',,224<8 r+   c                J    \        V P                  \        P                  4      # r   )
isinstancer$   r   	BaseTupler'   s   &r(   need_advanced_indexing&UfuncAtIterator.need_advanced_indexing*   s    $//5??;;r+   c                L   ^ RI HpHp V P                  V P                  reV P
                  V P                  rVP                  \        P                  4      ! ^ 4      p	V P                  e   \        P                  ! W)4      V n        V P                  4       '       d:   \        P                  ! W&\!        V4      R7      pVP                  p
V! WW4      w  rMV3pV3p
V! WW4      w  rV! WWuW4      V n        V P"                  P%                  4        V P'                  W4      V n        R# )r   )normalize_indicesFancyIndexerN)count)numba.np.arrayobjr?   r@   r!   r#   r"   r$   get_value_typer   intpr%   r   alloca_once_valueb_indicer<   unpack_tuplelenr.   prepare_compile_ufunccres)r'   r2   r3   r?   r@   r!   r#   r"   r$   zeroindex_typess   &&&        r(   r-   UfuncAtIterator._prepare-   s    EVVT\\799dooj%%ejj1!466#55gDDM&&((**714ZBG$**K#4W5@$K K jG%-K#4W5@$K K $Gd$/:''9	r+   c           	        ^ RI Hp \        P                  ! W$P                  4      p\        P                  ! W$P
                  4      pVP                  p	\        P                  ! WWVVP                  V4      p
V! WWZ4      pW3# )r   )	load_item)	rB   rP   r   rG   shapestridesdataget_item_pointer2layout)r'   r2   r3   r4   arrayarray_tyrP   shapesrR   rS   ptrvals   &&&&&&      r(   	_load_valUfuncAtIterator._load_valI   si    /%%g{{;&&w>zz''$(0G(8xr+   c                N   VP                  V4      pVP                  V\        P                  4      pVP	                  \
        P                  V4      pV! W$V34      p	VP                  \        P                  4      ! ^4      p
VP                  Wj4      pVP                  Wc4       RV	3# )   N)
loaddtyper   rD   get_functionoperatorgetitemrC   addstore)r'   r2   r3   r#   rV   rW   idxsigimplrZ   ones   &&&&&&     r(   
_load_flatUfuncAtIterator._load_flatT   s    ll7#nnXuzz2##H$4$4c:7CL) $$UZZ03kk##c#Syr+   c                    ^ RI Hp V P                  P                  P                  pVP
                  p	VP                  W&W4      pV! WWFV4       R# )r   )
store_itemN)rB   rm   rK   r   return_typer`   cast)
r'   r2   r3   rV   rW   rY   rZ   rm   fromtytotys
   &&&&&&&   r(   
_store_valUfuncAtIterator._store_vala   s?    0$$00~~ll767XC8r+   c                >   V P                   P                  ^ ,          pV P                  f   V P                  P                  3pM,V P                  P                  V P
                  P                  3pVP                  V4      pVP                  VP                  34       V# r   )	r    keyr%   r"   r`   r&   rd   add_linking_libslibrary)r'   r2   r3   r    rg   rK   s   &&&   r(   rJ   UfuncAtIterator._compile_ufunch   sm    

q!66>99??$C99??DIIOO4Cyy~  $,,1r+   c                   V P                   pV P                  V P                  reV P                  WW5V4      w  rxV P                  f   V3p	M;V P                  V P
                  V P                  rp
V P                  WWV4      w  rW3p	VP                  W$P                  VP                  V	4      pV P                  WWVW4       R # r   )rK   r!   r"   r[   r%   r&   rF   rj   call_internalfndescr   rr   )r'   r2   r3   r4   rK   r!   r"   rY   rZ   argsr%   r&   b_idxr5   val_bress   &&&&            r(   r0   UfuncAtIterator._call_ufunct   s    yy&&$))4>>'LTJ66>6D!VVTYYUAw4HHA<D##G[[$..$(*!3<r+   )
r!   r"   r%   rF   r&   rK   r.   r#   r$   r    NN)__name__
__module____qualname____firstlineno__r)   r6   r<   r-   r[   rj   rr   rJ   r0   __static_attributes____classdictcell__)__classdict__s   @r(   r   r      s7     !<:8	9
= =r+   r   c                    a  ^ RI Hp  ! V 3R lRVP                  4      pV;P                  S P                  P                  ,          un        V# )r   npyimplc                   >   <a a ] tR t^t oRt ZtV 3R ltRtVtV ;t	# )(make_dufunc_kernel.<locals>.DUFuncKernelz
npyimpl._Kernel subclass responsible for lowering a DUFunc kernel
(element-wise function) inside a broadcast loop (which is
generated by npyimpl.numpy_ufunc_kernel()).
c                   < \         SV `  WV4       V P                  P                  VP                  4      w  V n        V n        R # r   )superr)   dufuncfind_ewise_functionr}   	inner_sigrK   )r'   r2   r3   	outer_sig	__class__s   &&&&r(   r)   1make_dufunc_kernel.<locals>.DUFuncKernel.__init__   s6    GWy9(,(G(G) %DNDIr+   )rK   r   )
r   r   r   r   __doc__r   r)   r   r   __classcell__)r   r   _dufuncs   @@r(   DUFuncKernelr      s     	
 	  	 r+   r   )numba.npr   _Kernelr   r    )r   r   r   s   f  r(   make_dufunc_kernelr      s9      w   W]]333r+   c                   6   a a ] tR t^t oRtV 3R ltRtVtV ;t# )DUFuncLowererzHCallable class responsible for lowering calls to a specific DUFunc.
    c                R   < ^ RI Hp \        SV `  V\        VP
                  4       R# )r   r   N)r   r   r   r)   r   numpy_ufunc_kernel)r'   r   r   r   s   && r(   r)   DUFuncLowerer.__init__   s!    $+ 33	5r+    )	r   r   r   r   r   r)   r   r   r   r   r   s   @@r(   r   r      s     5 5r+   r   c                     a a ] tR t^t oRt]! R$4      tR%R ltV 3R ltR t	]
R 4       tR 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R tV 3R ltR t]R&R l4       tR tV3R lR ltV3R lR ltV3R lR ltV3R lR lt V3R lR lt!R&V 3R llt"R&R  lt#R! t$R" t%R#t&Vt'V ;t(# )'DUFuncz
Dynamic universal function (DUFunc) intended to act like a normal
Numpy ufunc, but capable of call-time (just-in-time) compilation
of fast loops specialized to inputs.
c           	     8   Vf   / p\        V4      '       d   VP                  p\        P                  ! 4       ;_uu_ 4        \	        RRRRV/VB ! V4      pR R R 4       V P                  XV4       \        P                  ! W4       R #   + '       g   i     L:; i)N_targetnpyufunccacher   )r
   py_funcr   3_suppress_deprecation_warning_nopython_not_suppliedr   _initialize	functoolsupdate_wrapper)r'   r   identityr   targetoptions
dispatchers   &&&&& r(   r)   DUFunc.__init__   s     MWooGMMOO .Z .#(.,..57J P 	X.  / POs   B		B	c                X  < \         P                  ! V4      p\        \        V `  WR 7       V\
        P                  8g  V n        VP                  P                  V n	        VP                  P                  V n
        \        V 4      V n        V P                  4        V P                  4        R# ))r   N)r   parse_identityr   r   r)   r   PyUFunc_Nonereorderabler   r   r   r   	_lower_me_install_cg_install_type)r'   r   r   r   s   &&&r(   r   DUFunc._initialize   s    ..x8fd$Z$C %	(>(>>"**33!))11&t,r+   c                    \        V P                  P                  P                  4       4      p\	        V P                  V P
                  V P                  VR7      # )$
NOTE: part of ReduceMixin protocol
)r   r   frozensiglist)list_dispatcher	overloadskeysdictr   _frozen)r'   r   s   & r(   _reduce_statesDUFunc._reduce_states   sJ     t''116689'']]<<	
 	
r+   c                    \         P                  P                  V 4      pVP                  W4       V F  pVP	                  V4       K  	  V'       d   VP                  4        V# )r   )r   _DUFunc__new__r   rd   disable_compile)clsr   r   r   r   r'   rg   s   &&&&&  r(   _rebuildDUFunc._rebuild   sQ    
   ((-.CHHSM   "r+   c                    V # )z;
For compatibility with the various *UFuncBuilder classes.
r   r;   s   &r(   build_ufuncDUFunc.build_ufunc   s	     r+   c                .    V P                   P                  # r   )r   r   r;   s   &r(   r   DUFunc.targetoptions   s    ---r+   c                .    V P                   P                  # r   )r    ninr;   s   &r(   r   
DUFunc.nin   s    zz~~r+   c                .    V P                   P                  # r   )r    noutr;   s   &r(   r   DUFunc.nout   s    zzr+   c                .    V P                   P                  # r   )r    nargsr;   s   &r(   r   DUFunc.nargs       zzr+   c                .    V P                   P                  # r   )r    ntypesr;   s   &r(   r   DUFunc.ntypes   s    zz   r+   c                .    V P                   P                  # r   )r    r   r;   s   &r(   r   DUFunc.types   r   r+   c                .    V P                   P                  # r   )r    r   r;   s   &r(   r   DUFunc.identity   s    zz"""r+   c                .    V P                   P                  # r   )r    r   r;   s   &r(   r   DUFunc.signature  s    zz###r+   c                `    \        V P                  P                  4      ^ 8  g   Q hRV n        R# )z9
Disable the compilation of new signatures at call time.
TN)rH   r   r   r   r;   s   &r(   r   DUFunc.disable_compile  s*    
 4##--.222r+   c                T    \         P                  ! V4      w  r#V P                  W#4      # )z-
Compile the DUFunc for the given signature.
)r   normalize_signature_compile_for_argtys)r'   rg   r}   rn   s   &&  r(   rd   
DUFunc.add  s(     %88=''::r+   c                <  < \         P                  P                  P                  pV\	        VP                  4       4      ,            FD  p\        \        V4      RV4      VJg   K  VP                  ! V R.VO5/ VB pV\        Jg   KB  Vu # 	  \        SV `(  ! V/ VB # )ze
Allow any argument that has overridden __array_ufunc__ (NEP-18)
to take control of DUFunc.__call__.
__array_ufunc____call__)r   npndarrayr   tuplevaluesgetattrtypeNotImplementedr   r   )r'   r}   kwsdefaultargoutputr   s   &*,   r(   r   DUFunc.__call__  s    
  ""**::%

---CtCy"3W=WL,,T:LLL/!M	 . 7#T1S11r+   c           	     |   V P                   P                  pV'       d[   R V9   d   VP                  R 4      pW3,          pV'       d2   \        RRP	                  R \        V4       4       4      ,          4      h\        V4      pWS8X  g$   WSV P                   P                  ,           8X  g   Q hV'       d   Q h. pVRV  Fb  p\        V4      p\        V\        P                  4      '       d   VP                  pM\        P                  ! V4      pVP                  V4       Kd  	  V P!                  \#        V4      4      # )outz)unexpected keyword arguments to ufunc: %sz, c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   )repr).0ks   & r(   	<genexpr>+DUFunc._compile_for_args.<locals>.<genexpr>,  s     +I[DGG[   N)r    r   pop	TypeErrorjoinsortedrH   r   r   r9   r   Arrayr`   r   map_arrayscalar_typeappendr   r   )	r'   r}   r   r   r   args_lenargtysr   argtys	   &*,      r(   _compile_for_argsDUFunc._compile_for_args$  s    jjnn|ggen K"&))+IVC[+I"I!J K K t9Xtzz1F%FGGw:C3KE%-- &::3?MM%   ''f66r+   c                
   V P                   '       d   \        RV : 24      h\        V\        4      '       g   Q hVf   TpMV! V!  pV P                  P
                  P                  4        FD  w  rEWP                  8X  g   K  RV R2p\        P                  ! V\        P                  4       Vu # 	  \        P                  ! V P                  V P                  V4      w  rQp\        P                  ! WQV4      p\        P                   ! WW4      w  rp
V P#                  \%        V	4      V4       V P&                  P)                  WP*                  V
34       V P,                  P.                  P)                  VP*                  4       V# )z
Given a tuple of argument types (these should be the array
dtypes, and not the array types themselves), compile the
element-wise function for those inputs, generate a UFunc loop
wrapper, and register the loop with the Numpy ufunc object for
this DUFunc.
compilation disabled for z>Compilation requested for previously compiled argument types (z~). This has no effect and perhaps indicates a bug in the calling code (compiling a ufunc more than once for the same signature)r   RuntimeErrorr9   r   r   r   itemsr}   warningswarnr	   NumbaWarningr   _compile_element_wise_functionr   _finalize_ufunc_signature!_build_element_wise_ufunc_wrapper	_add_loopint
_keepaliver  rx   r   libs)r'   r  rn   rg   r  rK   msg
actual_sig	dtypenumsrY   envs   &&&        r(   r   DUFunc._compile_for_argtysC  sF    <<<FGG&%((((Cv&C''11779GA""( *EE c6#6#67 : %1$O$Od00#%7!k!;;+'
*LL	s3x+\\378""4<<0r+   c                     VP                   V8H  # r   )r}   )r'   ewise_typesrg   s   &&&r(   match_signatureDUFunc.match_signatureh  s    xx;&&r+   c                   < V ^8  d   QhRR/#    returnNr   )formatr   s   "r(   __annotate__DUFunc.__annotate__k  s     2 2T 2r+   c                    R  R lp\         P                  ! V4      pRpV F  pV! V4      p\        W54      ! V4       K  	  R# )c                0    V ^8  d   QhR\         R\        /# )r*  attrr+  )strr   )r,  s   "r(   r-  6DUFunc._install_ufunc_attributes.<locals>.__annotate__m  s     	 	c 	h 	r+   c                    a  V 3R  lpV# )c                 L   <a \        V P                  ^ ,          S4      oV3R l# )r   c                    < S# r   r   )r    rZ   s   &r(   <lambda>UDUFunc._install_ufunc_attributes.<locals>.get_attr_fn.<locals>.impl.<locals>.<lambda>q  s    Sr+   )r   rv   )r    rZ   r1  s   &@r(   rh   CDUFunc._install_ufunc_attributes.<locals>.get_attr_fn.<locals>.implo  s    eiilD1((r+   r   )r1  rh   s   f r(   get_attr_fn5DUFunc._install_ufunc_attributes.<locals>.get_attr_fnm  s    ) Kr+   N)r   r   r   r   r   )r   Functionr   )r'   templater:  at
attributesr1  attr_fns   &&     r(   _install_ufunc_attributes DUFunc._install_ufunc_attributesk  s?    	 ^^H%/
D!$'Gr(1 r+   c                   < V ^8  d   QhRR/# r)  r   )r,  r   s   "r(   r-  r.    s     ) )$ )r+   c                l    V P                  V4       V P                  V4       V P                  V4       R # r   )_install_ufunc_reduce_install_ufunc_reduceat_install_ufunc_at)r'   r=  s   &&r(   _install_ufunc_methodsDUFunc._install_ufunc_methods  s,    ""8,$$X.x(r+   c                   < V ^8  d   QhRR/# r)  r   )r,  r   s   "r(   r-  r.    s     c$ c$T c$r+   c                b   a  \         P                  ! V4      p\        VR 4      RV 3R ll4       pR# )r>  Nc                   <a aaaa \         P                  ! R \        P                  R7       \	        V\
        P                  4      '       g   Rp\        P                  ! V4      h\	        V\
        P                  4      p\	        V\
        P                  4      p\	        V\
        P                  4      p\	        V\
        P                  4      pT;'       g    T;'       g    T'       * p	T;'       d    \        V4      ^ 8H  p
\	        V\
        P                  \
        P                  \
        P                  \
        P                  34      p\        P                  ! V4      oT;'       g    S'       * p\        V.4      pSP                   P"                  pV^8X  d3   \        P                  ! V4      '       d   \        P$                  ! R4      hV^8X  d5   \        P                  ! V4      '       g   Rp\        P$                  ! V4      h\        P                  ! V4      '       d   SP'                  VP(                  34       MMV'       d   SP'                  VP(                  V34       M'SP'                  VP(                  VP(                  34       V 3R lo\*        V3R l4       o\*        V3R l4       oRV3R llpRVVV3R	 llpRR
 lpRV3R llpV'       d   V# V
'       d   V'       d   V# V	'       d   V'       d   V# V# )z ufunc.at feature is experimentalcategoryz)The first argument "a" must be array-likezsecond operand needed for ufuncz+second operand provided when ufunc is unaryc           	         < ^ RI Hp \        V4      ^8X  d   VP                  w  rVrxVw  rYrM"VP                  R,           w  rVrxVR,           w  rYrV! V4      ! WV	4      p	\	        SWWW4      pVP                  W4       R# )r   )
make_arrayNr   )rB   rP  rH   r}   r   r6   )r2   r3   rg   r}   rP  r5   atyidxtybtyr!   r#   r%   at_iterr    s   &&&&         r(   apply_ufunc_codegenDDUFunc._install_ufunc_at.<locals>.ol_at.<locals>.apply_ufunc_codegen  sx    8t9>),&AE'+$A'1),G);&AE'+g~$A'sOGa8)%PG-r+   c                 :   < \         P                  ! WW44      pVS3# r   r   none)	typingctxr    r!   r#   r%   rg   rU  s   &&&&& r(   apply_a_b_ufunc@DUFunc._install_ufunc_at.<locals>.ol_at.<locals>.apply_a_b_ufunc  s    jj76///r+   c                 :   < \         P                  ! WV4      pVS3# r   rX  )rZ  r    r!   r#   rg   rU  s   &&&& r(   apply_a_ufunc>DUFunc._install_ufunc_at.<locals>.ol_at.<locals>.apply_a_ufunc  s    jj73///r+   c                    < S'       d'   V P                  V\        P                  ! V4      4      # V P                  V\        P                  ! V4      \        P                  ! V4      4      # r   )r>  r   asarrayr    r!   r#   r%   b_nones   &&&&r(   	impl_cast:DUFunc._install_ufunc_at.<locals>.ol_at.<locals>.impl_cast  sJ     88Arzz'':;; 88A$&JJw$7$&JJqM3 3r+   c                    < S'       d   S! WV4       R # \         P                  ! V4      pW,          p\         P                  ! WEP                  4      pS! WW$P                  4       R # r   )r   ra  broadcast_torQ   flat)	r    r!   r#   r%   b_a_r[  r^  rc  s	   &&&&  r(   impl_generic=DUFunc._install_ufunc_at.<locals>.ol_at.<locals>.impl_generic  sD    !%G5ABBXX6B#Egww?r+   c                 ,    V ! VR,          V4      VR&   R # )Nr   r   )r    r!   r#   r%   s   &&&&r(   impl_indices_empty_b_scalarLDUFunc._install_ufunc_at.<locals>.ol_at.<locals>.impl_indices_empty_b_scalar  s    aeQ"r+   c                 ^   < S'       d   V ! W,          4      W&   R # V ! W,          V4      W&   R # r   r   rb  s   &&&&r(   impl_scalar_scalarCDUFunc._install_ufunc_at.<locals>.ol_at.<locals>.impl_scalar_scalar  s$    !&qz!2AJ!&qz1!5AJr+   r   )r  r  r	   NumbaExperimentalFeatureWarningr9   r   r	  NumbaTypeErrorListTuple	SliceTyperH   Sequencer   is_nonelikeanyr    r   TypingErrorrd   r`   r   )r    r!   r#   r%   r  indices_arrindices_listindices_tupleindices_sliceindices_scalarindices_empty_tupleb_arrayb_scalar	need_castr   rd  rk  rn  rq  r[  r^  rU  rc  r'   s   f&&&               @@@@r(   ol_at'DUFunc._install_ufunc_at.<locals>.ol_at  s3   MM<#)#I#IK a--A++C00$Wekk:K%guzz:L&w<M&w@M"-"O"O"O"O-PN"/"E"ECLA4E U[[%..%**%*[[%2 3G((+F#--v.H\N+I**..C axG//22(()JKK ax 3 3A 6 6C((--""1%%!''$!''1&!''177+,. 0 0 0 03@ @(6   $22H))##r+   r   r   r<  r   )r'   r=  r>  r  s   f&  r(   rG  DUFunc._install_ufunc_at  s,    ^^H%	T	"_	$ 
#_	$r+   c                   < V ^8  d   QhRR/# r)  r   )r,  r   s   "r(   r-  r.    s     d( d( d(r+   c                b   a  \         P                  ! V4      p\        VR 4      RV 3R ll4       pR# )reduceNc                 T  <aaaaaaaaaaaaaa \         P                  ! R \        P                  R7       \	        V\
        P                  4      '       g   Rp\        P                  ! V4      h\	        V\
        P                  4      ;'       d%    \	        VP                  \
        P                  4      p\	        V\
        P                  4      ;'       d    \        V4      ^ 8H  p\        P                  ! V4      pSP                  P                   RJ oSP                  P"                  oSP$                  '       g5   V'       d-   \        V4      ^8  d   RS R2p\        P                  ! V4      hRVP&                  ,          oRVP&                  ^,
          ,          o\        P                  ! V4      '       d   VP                  MToSP                   o\        P                  ! S4      o\        P                  ! V4      o\(        V3R l4       o\(        V3R l4       o\*        R 4       o\(        R	 4       o\(        R
 4       oRVVVVV3R llp	RVVVVVVV3R llp
RVVV3R llpRR lpRV3R llpVP&                  ^8X  d   V'       g   V	# V'       d   V# V'       d!   \-        \/        VP&                  4      4      oV# V'       d   R\        V4      ^,
          ,          oV# V^ 8X  g@   \	        V\
        P                  \
        P0                  \
        P2                  34      '       d   V
# R# )z$ufunc.reduce feature is experimentalrM  -The first argument "array" must be array-likeNzreduction operation 'z:' is not reorderable, so at most one axis may be specifiedc                 r   < Sp^ p\        V 4       F"  w  rEWA8X  d   K  \        W#V4      pV^,          pK$  	  V# ru   )	enumerater   )tuppossijetup_init_m1s   &&    r(   tuple_sliceDDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.tuple_slice  sC      %cNDAx %aA.AFA	 +
 r+   c                    < Sp^ ^ \        V4      repWV8  d<   WQ8X  d   \        W5V4      pMW,          p\        W5V4      pV^,          pV^,          pKA  V# ru   rH   r   )	r  r  rZ   r  r  r  szr  tup_inits	   &&&     r(   tuple_slice_appendKDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.tuple_slice_append  sY     aQbfx)!4F)!2QFAr+   c                 j   aa \         P                  ! WW44      p\        V4      oV3R  loVV3R lpWV3# )c                 <  < Vw  rVrvV P                  VR 7      pV P                  V4      ;_uu_ 4        \        P                  ! ^@4      ! ^ 4      p	T	p
V^ 8X  da   \	        ^S4       FN  pV P                  W[^,
          4      pV P                  W{4      pV P                  W4      pV P                  W4      p
KP  	  EM4^ Tu;8  d   S^,
          8  d   M M\	        ^ V4       FG  pV P                  W[4      pV P                  W{4      pV P                  W4      pV P                  W4      p
KI  	  \	        V^,           S4       FN  pV P                  W[^,
          4      pV P                  W{4      pV P                  W4      pV P                  W4      p
KP  	  M^\	        ^ S^,
          4       FG  pV P                  W[4      pV P                  W{4      pV P                  W4      pV P                  W4      p
KI  	  V P                  V4       RRR4       W3#   + '       g   i     TX
3# ; i)nameN)	append_basic_block
goto_blockr   IntTyperangeextract_valuemulrd   branch)r3   	block_pos
block_namebb_endr}   rR   r5   rf   bbrL   flat_idxr  strideidx_imlen_idxs   &&&&&          r(   	gen_block\DUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.compute_flat_idx.<locals>.gen_block0  s   )-&G 333DB ++B//!zz"~a0#'$>%*1g%6)0)>)>wA)N(/(=(=c(E$+KK$>+2;;x+C	 &7
 8Wq[8%*1i%8)0)>)>w)J(/(=(=c(E$+KK$>+2;;x+C	 &9 &+9q='%B)0)>)>wA)N(/(=(=c(E$+KK$>+2;;x+C	 &C &+1gk%:)0)>)>w)J(/(=(=c(E$+KK$>+2;;x+C	 &;  v.; 0> <'? 0/> x<'s   GHH	c                   < Vw  rErgVP                   pVP                  R R7      p	. p
\        S4       F$  pS! WRV 2W4      w  rV
P                  W34       K&  	  VP	                  V4      ;_uu_ 4        VP                  WzR,          ^ ,          4      p\        S4       F"  pVP                  WV,          ^ ,          4       K$  	  RRR4       VP                  V	4       VP                  V
^ ,          ^,          P                  4      pV
 F  w  ppVP                  VV4       K  	  VP                  W4      #   + '       g   i     Ly; i)axis_endr  axis_N)basic_blockr  r  r  r  switchadd_caseposition_at_endphir   add_incomingsdiv)r2   r3   rg   r}   rR   itemsizerf   axisr  
switch_endlr  blockr  r  r  valuer  r  s   &&&&             r(   codegenZDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.compute_flat_idx.<locals>.codegenU  s   370Gs ,,B!(!;!;!;!LJA"7^*3G%s4>+F%!23 ,
 !++B//!(eAh!?!&wA"OOAtAw7 "0 0
 ++J7!++ad1gll3C()u((6 )*"<<66 0/s   3AD55E	)r   rD   rH   )	rZ  rR   r  rf   r  rg   r  r  r  s	   &&&&&  @@r(   compute_flat_idxIDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.compute_flat_idx+  s1    jjC>c(#(J7, |#r+   c                     T p\        \        V 4      4       F3  pW,          ^ 8  d   W,          V,           MW,          p\        W#V4      pK5  	  V# ru   )r  rH   r   )r  ndimaxr  rZ   s   &&   r(   
fixup_axisCDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.fixup_axism  sD    s4y)A,0GaK$'D.TWC&rc2B * 	r+   c                     ^ V ^ ,          r!\        \        V 4      4       F  pW,          V8  g   K  Y0V,          r!K  	  W3# ru   )r  rH   )r  rf   r  r  s   &   r(   find_minADUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.find_minu  s:    CFQs3xAvz!"FQ ) vr+   c                    < S'       d&   Vf"   \        V4      ^ 8X  d   RS R2p\        V4      h^ pS'       d   S
'       d   ^pV^ ,          pMS'       d   SpMTpVP                  ^ ,          p\        Wh4       F  p	V ! WqV	,          4      pK  	  V# )N'zero-size array to reduction operation  which has no identity)rH   
ValueErrorrQ   r  )r    rV   r  r`   initialr  startrr  r  id_noner   identity_none	init_none
ufunc_names   &&&&&     r(   impl_1d@DUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.impl_1d}  s     W_UqD(\)?AC$S/)EaA AA[[^u)Aaq*A *r+   c                   < Vf   \        R4      hV^ 8  d   W!P                  ,          pV^ 8  g   W!P                  8  d   \        R4      hS'       d.   Vf*   VP                  V,          ^ 8X  d   RS R2p\        V4      hS! VP                  V4      pVfP   SfL   \        P                  ! VSR7      p\        P
                  ! V4       F  w  rS! W^ 4      p
W,          Wx&   K  	  M:Vf   Se   \        P                  ! VSSR7      pM\        P                  ! WdSR7      pVP                  4       pVff   Sfb   \        P
                  ! V4       FE  w  rW,          ^ 8X  d   K  S! VP                  VP                  W4      pW,          TrV ! W4      W&   KG  	  V# \        P
                  ! V4       FM  w  rVf   Sf   W,          ^ 8X  d   K  S! VP                  VP                  W4      pW,          TrV ! W4      W&   KO  	  V# )Nz'axis' must be specifiedInvalid axisr  r  r`   )
fill_valuer`   )
r  r  rQ   r   emptyndenumeratefullravelrR   r  )r    rV   r  r`   r  r  rQ   r  rf   r5   
result_idxviewrZ   flat_poslhsrhsr  r   r  nb_dtyper  r  r  s   &&&&&           r(   impl_nd_axis_intIDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.impl_nd_axis_int  s   
 <$%?@@!8JJ&D!8tzz1$^44 W_T9Ja9OD(\)?AC$S/) $EKK6?x'7h7A"$.."3%71%E
!&!2 #4 _)= ((KAJA wwy?x'7$&NN5$99>$'7		1::8;(CH'+~s-23_DN %:"  %'NN5$9"?x/? #	Q$#3AIIqzz47$?#'>3S).s %: r+   c                   < S! W!P                   4      p\        ^ \        V4      4       Fs  pWV,          ^ 8  g   WV,          VP                   8  d   \        R4      h\        V^,           \        V4      4       F!  pWV,          WW,          8X  g   K  \        R4      h	  Ku  	  S! V4      w  rV P	                  VV	VVR7      p
\        V4      ^8X  d   V
# \        V4      ^8X  d/   V P	                  WV^,           ^,          ,          ^,
          R7      # Sp\        \        V4      4       F  pWh8w  g   K  \        WWV,          4      pK  	  V P	                  WR7      # )r   r  zduplicate value in 'axis')r  r`   r  r  )r  r  rH   r  r  r   )r    rV   r  r`   r  r  r  r  min_idxmin_elemr  r  axis_tupr  r  s   &&&&&       r(   impl_nd_axis_tupleKDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.impl_nd_axis_tuple  s$   
 #44q#e*-Ax!|ux5::'=(88"1q5#e*5 8ux/",-H"II 6	 . %-UO!LL&.',)0 ! 2 t9>HY!^ <<w{a6G0H10L<MM!B"3r7^<!.reh!?B , !<<<33r+   c                     V# r   r   )r    rV   r  r`   r  s   &&&&&r(   impl_axis_empty_tupleNDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.impl_axis_empty_tuple  s	    
 r+   c                 *   < V P                  VSW44      # r   )r  )r    rV   r  r`   r  r  s   &&&&&r(   impl_axis_noneGDUFunc._install_ufunc_reduce.<locals>.ol_reduce.<locals>.impl_axis_none  s    
 ||E8UDDr+   ru   r   NN)r  r  r	   rs  r9   r   r	  rt  UniTupler`   Integerrv  rH   r   ry  r    r   r   r   r  r   r   r   r  OmittedIntegerLiteral)r    rV   r  r`   r  r  axis_int_tupleaxis_empty_tuple	axis_noner  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r'   s   &&&&&         @@@@@@@@@@@@@@r(   	ol_reduce/DUFunc._install_ufunc_reduce.<locals>.ol_reduce  s    MM@#)#I#IK eU[[11E++C00'enn= 6 64::u}}5 )$<OOTa++D1I JJ//47M,,J ###3t9q=.zl ;K K++C00uzz*H%**q.1K&-&9&9%&@&@u{{eH}}H))(3G++G4I
 
   ?$ ?$B     (< <|4 4<E zzQ'7!,, uzz!23%%  3t9q=1))j05050D0D0F G G
 ('Gr+   r  r  )r'   r=  r>  r  s   f&  r(   rE  DUFunc._install_ufunc_reduce  s,    ^^H%	X	&`	( 
'`	(r+   c                   < V ^8  d   QhRR/# r)  r   )r,  r   s   "r(   r-  r.    s     ~ ~4 ~r+   c                b   a  \         P                  ! V4      p\        VR 4      RV 3R ll4       pR# )reduceatNc                 "  <aaaaaa \         P                  ! R \        P                  R7       SP                  P
                  ^8w  d   Rp\        P                  ! V4      h\        P                  ! V4      '       g   Rp\        P                  ! V4      h\        P                  ! V4      '       g   Rp\        P                  ! V4      h\        V\        P                  \        P                  \        P                  \        34      '       g   Rp\        P                  ! V4      h\        P                   ! V4      oS'       g7   \        V\        P"                  4      '       g   \        P                  ! R4      h\        V\        P"                  4      pV'       d   VP$                  M^ oRS^,
          ,          o\        V\        P"                  4      p\        P                   ! V4      '       d   VP&                  MToT;'       d    T'       * p	V'       d7   VP$                  ^8w  d&   RVP$                   2p\        P(                  ! V4      hV	'       d   RR lp
V
# \*        V3R	 l4       o^ R
IHp V! VP$                  R4      oRVVVVV3R llpV# )z&ufunc.reduceat feature is experimentalrM  z,reduceat only supported for binary functionsr  z0The second argument "indices" must be array-likez"axis" must be an integerzoutput must be an arrayz8Expect "indices" array to have at most 1 dimension. Got c                 ~    V P                  \        P                  ! V4      \        P                  ! V4      VVVR 7      # ))r`   r   )r	  r   ra  )r    rV   r#   r  r`   r   s   &&&&&&r(   rd  FDUFunc._install_ufunc_reduceat.<locals>.ol_reduceat.<locals>.impl_cast<  s8     >>"**U*;*,**W*=*.05.1	 * 3 3r+   c                    < Sp^ ^ rCV\        V 4      8  d-   W18w  d   \        W$W,          4      pV^,          pV^,          pK<  V# ru   r  )r  r  r  r  r  tup_m1s   &&   r(   r  HDUFunc._install_ufunc_reduceat.<locals>.ol_reduceat.<locals>.tuple_sliceD  sD    !1#c(lx)!7QFAr+   )"generate_getitem_setitem_with_axissetitemc                   < VP                   ^ ,          pTpV^ 8  d
   VS,          pV^ 8  g   VS8  d   \        RV RS 24      h\        VP                   W64      pS'       g   VP                   V8w  d   Rp	\        V	4      hS'       d   \        P                  ! VSR7      p\        V4      ^ 8X  d   V# ^ p
\        \        V4      ^,
          4       EF'  pW+,          W+^,           ,          8  dn   \        P                  ! W+,          W+^,           ,          4      pS^8  d   \        P                  ! WV4      pMW,          pV P                  WR7      pS! WZW>4       MW+,          W+^,           ,          8  dU   W+,          p\        P                  ! WV4      pS^8  d%   S! VP                   V4      pVP                  V4      pS! WZW=4       M%W+,          V8  g   W+,          ^ 8  d   \        R4      hV
^,          p
EK*  	  \        P                  ! VR,          VP                   V,          4      pS^8  d   \        P                  ! WV4      pMW,          pV P                  W4      pS! WZW>4       V# )r   zaxis z) is out of bounds for array of dimension z=operands could not be broadcast together with remmaped shapesr  r  zInvalid value for indicesr  )rQ   r  r   r   zerosrH   r  arangetaker  reshape)r    rV   r#   r  r`   r   r  r  rQ   r  r  r  rf   	arr_slice
arr_reduce_slice
array_ndimdtout_noner  r  s   &&&&&&          r(   rh   ADUFunc._install_ufunc_reduceat.<locals>.ol_reduceat.<locals>.implT  s   ]]1%!8J&D!8tz1$uRD 155?L&B C C &ekk4<CII$6-C$S/)((53C w<1$Js7|a/0AzGEN2 ii
GENC%>(*D(AI(-
I%*\\)\%G
9 w1u~5%j$&GGE$=	%>%0d%CF(1(9(9&(AI8 r)WZ!^()DEEFA% 1* iiU[[->?> "D 9I %
I"\\):
1
r+   ru   r  )r  r  r	   rs  r    r   rt  r   type_can_asarrayr9   r   r  r  r   r  r   ry  r	  r  r`   NumbaValueErrorr   rB   r  )r    rV   r#   r  r`   r   r  	array_arrr|  r  rd  r  rh   r  r  r  r  r  r  r'   s   &&&&&&       @@@@@@r(   ol_reduceat3DUFunc._install_ufunc_reduceat.<locals>.ol_reduceat  s    MMB#)#I#IK zz~~"D++C00 11%88E++C00 11'::H++C00dU]]EMM%*%9%93%@ A A1++C00**3/HJsEKK$@$@++,EFF"5%++6I'0aJZ!^,F$Wekk:K ' 3 3E : :B&66;7Iw||q0%ll^-,,S113 !   M8YOG8 8t Kr+   r  r  )r'   r=  r>  r!  s   f&  r(   rF  DUFunc._install_ufunc_reduceat  s,    ^^H%	Z	(z	 
)z	r+   c                  < \         P                  ! V4      '       d   V3MW3pR  V 4       p\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      pV P                  V4      R8X  d5   V P                  '       d   RV : R2p\        V4      hV P                  ! V!   \         P                  ! V4      '       d   \        SV `!  W4      # \        SV `   ! WV3!  # )c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   )r   r   r   s   & r(   r  DUFunc.at.<locals>.<genexpr>  s     .#&++r  c              3   ~   "   T F3  p\        V\        P                  4      '       d   VP                  MTx  K5  	  R # 5ir   )r9   r   r	  r`   r&  s   & r(   r  r'    s0      /'- *4C)E)ECII3N'-s   ;=r  z.at(...)r   )	r   ry  r   r   r   r  r  r   r>  )	r'   r!   r#   r%   r}   r  r%  r  r   s	   &&&&    r(   r>  	DUFunc.at  s    **1--tA6..e /'-/ee /'-/ / ##K0L@|||?CE"3''""D) q!!7:a))7:A//r+   c           	     6   Vf!   V P                   P                  P                  p\        RV P                  P
                  ,           \        3\        W P                  R7      4      pVP                  W4       V P                  V4       V P                  V4       R# )a  Constructs and installs a typing class for a DUFunc object in the
input typing context.  If no typing context is given, then
_install_type() installs into the typing context of the
dispatcher object (should be same default context used by
jit() and njit()).
NDUFuncTyping_)rv   generic)r   targetdescrtyping_contextr   r    r   r   r   _type_meinsert_user_functionrA  rH  )r'   rZ  _ty_clss   && r(   r   DUFunc._install_type  sz     ((44CCI)<)<<(*mm<> 	&&t5&&w/##G,r+   c                L   V P                   '       dO   \        P                  ! W4      pVf   R# \        VP                  VP
                  ,           4      R\        V4       pV P                  P                  P                  4        F  w  r4VP                  V8X  g   K  W43u # 	  R# )z
Given a tuple of element-wise argument types, find a matching
signature in the dispatcher.

Return a 2-tuple containing the matching signature, and
compilation result.  Will return two None's if no matching
signature was found.
Nr   )r   r   ufunc_find_matching_loopr   inputsoutputsrH   r   r   r  r}   )r'   r%  looprg   rK   s   &&   r(   r   DUFunc.find_ewise_function  s     <<< 99$LD|!!dll :;<MS=MNK))3399;ICxx;&y  < r+   c                   V'       d   Q hV P                   p\        P                  P                  W1V4      pVw  rVrx\	        V4      p	V	^ 8  d   \        VR\	        V4      )  4      p
M\        V4      p
V P                  V
4      w  rVf[   V P                  '       d   \        P                  ! RV : RV: 24      hV P                  V
4       V P                  V
4      w  rVf   Q hV	^ 8  d   \        V4      pM_VP                  ^8X  d9   V^ 8  d$   \        P                  ! VP                  Wx4      .pM$VP                  .pM\        P                   ! R4      hVP#                  V4       \%        V!  # )z
Implement AbstractTemplate.generic() for the typing class
built by DUFunc._install_type().

Return the call-site signature after either validating the
element-wise signature or compiling for it.
Nzcannot call z with types ztyping gufuncs (nout > 1))r    r   Numpy_rules_ufunc_handle_inputsrH   r   r   r   r	   rt  r   r   r   r   r	  rn   NumbaNotImplementedErrorextendr   )r'   r  kwtysr    _handle_inputs_result
base_typesexplicit_outputsndimsrU   explicit_output_countr%  rg   rK   outtyss   &&&           r(   r/  DUFunc._type_me  sN    y

 ' 9 9 H H5!"6K3
e #$4 5 1$
+BS1A-B,B CDK
+K,,[9	; |||++/3V-= > >$$[100=IC?"? 1$*+FZZ1_qy++coouEF//*112MNNf&!!r+   )r   r   r   r   r   )r   r  r   r   )NFNr   ))r   r   r   r   r   set_DUFunc__base_kwargsr)   r   r   classmethodr   r   propertyr   r   r   r   r   r   r   r   r   rd   r   r  r   r   r&  rA  rH  rG  rE  rF  r>  r   r   r/  r   r   r   r   s   @@r(   r   r      sa     ABM
0


   . .         ! !     # # $ $;27> " "H'2 2*) )
c$ c$Jd( d(L	~ ~@0*- (&" &"r+   r   )3r   rb   r  numpyr   numbar   r   
numba.corer   r   r   r   r	   numba.core.extendingr
   r   r   r   r   numba.core.typingr   numba.core.typing.templatesr   r   numba.cpython.unsafe.tupler   numba.np.ufuncr   numba.np.ufunc.ufunc_baser   r   numba.parforsr   r   r   r   typingr   llvmliter   numba.core.compiler_lockr   r   r   r   ReduceMixinr   r   	MAP_TYPESr  r   r+   r(   <module>rY     s         B B- - & C 4 $ A ( ' "   9j= j=Z(5$ 5K"Y""I$5$5y K"\      'r+   