+
     þÎjú1  ã                   óÔ   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHtHt ^ R
ItR t ! R R]
4      t ! R R]P.                  ]	4      tR tR
# )é    )Útypeof)Útypes)ÚGUFuncBuilder)Úparse_signature)Ú	UfuncBaseÚUfuncLowererBase)Úufunc_find_matching_loop)Ú	serializeÚerrors)Únpydecl)Ú	signatureÚAbstractTemplateNc                 óŠ   a € ^ RI Hp  ! V 3R lRVP                  4      pV;P                  S P                  ,          un        V# )r   ©Únpyimplc                   óV   <a a€ ] tR t^t oRt ZtV 3R ltV 3R ltV 3R ltRt	Vt
V ;t# )Ú(make_gufunc_kernel.<locals>.GUFuncKernelzª
npyimpl._Kernel subclass responsible for lowering a gufunc kernel
(element-wise function) inside a broadcast loop (which is
generated by npyimpl.numpy_gufunc_kernel()).
c                óÂ   <€ \         SV `  WV4       V P                  P                  VP                  4      pV P                  P                  V4      w  V n        V n        R # ©N)ÚsuperÚ__init__ÚdufuncÚ_get_ewise_dtypesÚargsÚfind_ewise_functionÚ	inner_sigÚcres)ÚselfÚcontextÚbuilderÚ	outer_sigÚewise_typesÚ	__class__s   &&&& €ÚK/opt/data/home/.local/lib/python3.14/site-packages/numba/np/ufunc/gufunc.pyr   Ú1make_gufunc_kernel.<locals>.GUFuncKernel.__init__   sJ   ø€ Ü‰GÑ˜W¨yÔ9ØŸ+™+×7Ñ7¸	¿¹ÓGˆKØ(,¯©×(GÑ(GØó)Ñ%ˆDŒN˜DžIó    c                óØ   <€ \        V\        P                  4      '       d;   \        V\        P                  4      '       g   \        SV `  WP
                  V4      # \        SV `  WV4      # r   )Ú
isinstancer   ÚArrayr   ÚcastÚdtype)r   ÚvalÚfromtyÚtotyr#   s   &&&&€r$   r*   Ú-make_gufunc_kernel.<locals>.GUFuncKernel.cast   sK   ø€ ä˜&¤%§+¡+×.Ò.Ü˜t¤U§[¡[×1Ò1Ü‘w‘| C¯©°tÓ<Ð<Ü‘7‘< ¨TÓ2Ð2r&   c                óè   <€ V P                   P                  '       d   R p\        P                  ! V4      hV P                  P                  V P                   P                  34       \        SV `   ! V!  # )zCCalling a guvectorize function in object mode is not supported yet.)	r   Ú
objectmoder   ÚNumbaRuntimeErrorr   Úadd_linking_libsÚlibraryr   Úgenerate)r   r   Úmsgr#   s   &* €r$   r5   Ú1make_gufunc_kernel.<locals>.GUFuncKernel.generate%   sZ   ø€ Ø�y‰y×#×#Ð#ð(�ä×.Ò.¨sÓ3Ð3Ø�L‰L×)Ñ)¨4¯9©9×+<Ñ+<Ð*>Ô?Ü‘7Ò# TÑ*Ð*r&   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r*   r5   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r#   Ú__classdict__Ú_dufuncs   @@€r$   ÚGUFuncKernelr      s%   ú‡ € ñ	ñ
 ˆõ	õ	3÷	+õ 	+r&   rB   )Únumba.npr   Ú_Kernelr8   )rA   r   rB   s   f  r$   Úmake_gufunc_kernelrE      s5   ø€ Ý ÷+�w—‘ô +ð: ×Ò˜W×-Ñ-Õ-ÕØÐr&   c                   ó6   a a€ ] tR t^1t oRtV 3R ltRtVtV ;t# )ÚGUFuncLowererzHCallable class responsible for lowering calls to a specific gufunc.
    c                óR   <€ ^ RI Hp \        SV `  V\        VP
                  4       R# )r   r   N)rC   r   r   r   rE   Únumpy_gufunc_kernel)r   Úgufuncr   r#   s   && €r$   r   ÚGUFuncLowerer.__init__4   s!   ø€ Ý$Ü‰Ñ˜Ü+Ø ×4Ñ4ö	6r&   © )	r8   r9   r:   r;   r<   r   r=   r>   r?   )r#   r@   s   @@r$   rG   rG   1   s   ù‡ € ñ÷6õ 6r&   rG   c                   óª   a € ] tR t^;t o RtRR ltR tR t]R 4       t	R t
RR ltR	 tR
 tR tR tRR ltR t]R 4       tR tR tR tR tRtV tR# )ÚGUFuncz¶
Dynamic generalized universal function (GUFunc)
intended to act like a normal Numpy gufunc, but capable
of call-time (just-in-time) compilation of fast loops
specialized to inputs.
Nc                ó–  € Vf   / pR V n         RV n        WPn        W0n        \	        WW4Wg4      V n        V P
                  P                  P                  V n        V P
                  P                  P                  V n        V P
                  P                  V n
        V P                  V P                  4       \        P                  ! W4       R # )NF)ÚufuncÚ_frozenÚ_is_dynamicÚ	_identityr   Úgufunc_builderÚpy_funcr8   r<   Únb_funcÚ_dispatcherÚ_initializeÚ	functoolsÚupdate_wrapper)r   rU   r   ÚidentityÚcacheÚ
is_dynamicÚtargetoptionsÚwritable_argss   &&&&&&&&r$   r   ÚGUFunc.__init__C   s§   € àÒ ØˆMØˆŒ
ØˆŒØ%ÔØ!Œô
 ,Ø °óOˆÔð ×+Ñ+×3Ñ3×<Ñ<ˆŒØ×*Ñ*×2Ñ2×:Ñ:ˆŒØ×.Ñ.×6Ñ6ˆÔØ×Ñ˜×)Ñ)Ô*Ü× Ò  Ö/r&   c                ó†   € V P                  4        V P                  4        \        V 4      V n        V P	                  4        R # r   )Úbuild_ufuncÚ_install_typerG   Ú	_lower_meÚ_install_cg)r   Ú
dispatchers   &&r$   rX   ÚGUFunc._initializeX   s2   € Ø×ÑÔØ×ÑÔÜ& tÓ,ˆŒØ×ÑÖr&   c                óú   € V P                   p\        VP                  VP                  V P                  VP
                  V P                  VP                  VP                  VP                  V P                  R 7	      pV# ))	rU   r   r[   r\   r]   r^   r_   ÚtypesigsÚfrozen)rT   ÚdictrU   r   rS   r\   rR   r^   r_   Ú_sigsrQ   )r   ÚgbÚdcts   &  r$   Ú_reduce_statesÚGUFunc._reduce_states^   sc   € Ø× Ñ ˆÜØ—J‘JØ—l‘lØ—^‘^Ø—(‘(Ø×'Ñ'Ø×*Ñ*Ø×*Ñ*Ø—X‘XØ—<‘<ô

ˆð ˆ
r&   c
           
     ó~   € V ! WVWEWgR 7      p
V F  pV
P                  V4       K  	  V
P                  4        Wšn        V
# ))rU   r   r[   r\   r]   r^   r_   )Úaddrb   rQ   )ÚclsrU   r   r[   r\   r]   r^   r_   ri   rj   r   Úsigs   &&&&&&&&&&  r$   Ú_rebuildÚGUFunc._rebuildm   sF   € ñ ˜7À(ØØ!.ôMˆó ˆCØ�H‰H�SŽMñ à×ÑÔØŒØˆr&   c                ó"   € R V P                    R2# )z<numba._GUFunc 'z'>)r8   ©r   s   &r$   Ú__repr__ÚGUFunc.__repr__y   s   € Ø! $§-¡- °Ð3Ð3r&   c           	     óÞ   € Vf!   V P                   P                  P                  p\        RV P                  ,           \
        3\        W P                  R7      4      pVP                  W4       R# )a  Constructs and installs a typing class for a gufunc 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ÚGUFuncTyping_)ÚkeyÚgeneric)	rW   ÚtargetdescrÚtyping_contextÚtyper8   r   rk   Ú_type_meÚinsert_user_function)r   Ú	typingctxÚ_ty_clss   && r$   rc   ÚGUFunc._install_type|   sX   € ð ÒØ×(Ñ(×4Ñ4×CÑCˆIÜ�¨¯©Õ6Ü(Ð*Ü ¯m©mÔ<ó>ˆð 	×&Ñ& tÖ5r&   c                ó<   € V P                   P                  V4       R # r   )rT   rr   )r   Úftys   &&r$   rr   Ú
GUFunc.addŠ   s   € Ø×Ñ×Ñ Ö$r&   c                óD   € V P                   P                  4       V n        V # r   )rT   rb   rP   rx   s   &r$   rb   ÚGUFunc.build_ufunc�   s   € Ø×(Ñ(×4Ñ4Ó6ˆŒ
Øˆr&   c                óÀ   € \        V P                  P                  4      p\        \	        \
        V^ ,          4      4      \        \	        \
        V^,          4      4      3# ©r   )r   rT   r   ÚtupleÚmapÚlen)r   Ú
parsed_sigs   & r$   Úexpected_ndimsÚGUFunc.expected_ndims‘   sC   € Ü$ T×%8Ñ%8×%BÑ%BÓCˆ
Ü”cœ#˜z¨!�}Ó-Ó.´´c¼#¸zÈ!½}Ó6MÓ0NÐOÐOr&   c                ó&  € V'       d   Q hV P                   pV P                  P                  pV P                  4       w  rVWV,           p\	        V4      '       g   Q \	        V4      4       h\        V4       Fº  w  r‰\        V	\        P                  4      '       g   K'  V	P                  Wx,          8  g   K@  V\	        V4      8  d   RMRp
V\	        V4      8  d   TMV\	        V4      ,
          pV P                   RV
 RV RV	P                   RV RWx,           R2p\        P                  ! V4      h	  \        P                  P                  W1V4      pVw  p  pV P!                  V4      w  rOVfŠ   V P"                  '       d   R	V  R
V 2p\        P                  ! V4      hV P%                  V4       V P!                  V4      w  rOVR8X  d)   RV P                   R
V 2p\        P                  ! V4      hVf   Q h\        \        P&                  .VO5!  # )zÄ
Implement AbstractTemplate.generic() for the typing class
built by gufunc._install_type().

Return the call-site signature after either validating the
element-wise signature or compiling for it.
ÚInputÚOutputz: z	 operand z& does not have enough dimensions (has z, gufunc core with signature z
 requires Ú)zcannot call z with types zFail to compile ©NN)rP   rT   r   r’   r�   Ú	enumerater(   r   r)   Úndimr8   r   ÚTypingErrorr   ÚNumpy_rules_ufuncÚ_handle_inputsr   rQ   Ú_compile_for_argtysÚnone)r   ÚargtysÚkwsrP   rt   Ú	inp_ndimsÚ	out_ndimsÚndimsÚidxÚargÚkindÚir6   Ú_handle_inputs_resultr"   Ú_s   &&&             r$   r‚   ÚGUFunc._type_me•   sã  € ÷ ˆˆwØ—
‘
ˆØ×!Ñ!×+Ñ+ˆØ#×2Ñ2Ó4Ñˆ	ØÕ%ˆä�6�{Š{Ð&œC ›JÓ&ˆ{Ü! &Ö)‰HˆCÜ˜#œuŸ{™{×+Ô+°·±¸5½:Ö0EØ"%¬¨I«Ô"6‘w¸H�Ø¤ Y£Ô/‘C°S¼3¸y»>Õ5I�à—}‘}�o R¨ v¨Y°q°cð :.Ø.1¯h©h¨Zð 8!Ø!$  Z°µ
¨|¸1ð>ð ô ×(Ò(¨Ó-Ð-ñ *ô !(× 9Ñ 9× HÑ HØ˜3ó! Ðà4Ñˆ�Q˜˜1Ø×)Ñ)¨+Ó6‰ˆàŠ;ð �|�|ˆ|Ø$ T F¨,°v°hÐ?�Ü×(Ò(¨Ó-Ð-Ø×$Ñ$ [Ô1à×-Ñ-¨kÓ:‰FˆCØ�lÔ"Ø(¨¯©¨°|ÀFÀ8ÐL�Ü×(Ò(¨Ó-Ð-à’?Ð"�?äœŸ™Ð- fÓ-Ð-r&   c                ó\   € V P                   ! V!  pV P                  P                  V4       R # r   )Ú_get_function_typerT   rr   )r   r    Úreturn_typeÚfntys   &&& r$   rž   ÚGUFunc._compile_for_argtysÄ   s(   € ð ×&Ò&¨Ñ/ˆØ×Ñ×Ñ Ö%r&   c                óf   € V P                  VP                  4      p\        V4      \        V4      8H  # r   )r   r   rŽ   )r   r"   rt   Údtypess   &&& r$   Úmatch_signatureÚGUFunc.match_signatureË   s*   € Ø×'Ñ'¨¯©Ó1ˆÜ�V‹}¤ kÓ 2Ñ2Ð2r&   c                ó   € V P                   # r   )rR   rx   s   &r$   r]   ÚGUFunc.is_dynamicÏ   s   € à×ÑÐr&   c                óÒ   € \        R  V4      p. pV FQ  p\        V\        P                  4      '       d   VP	                  VP
                  4       K@  VP	                  V4       KS  	  V# )c                 ó\   € \        V \        P                  4      '       d   V # \        V 4      # r   )r(   r   ÚTyper   )r¦   s   &r$   Ú<lambda>Ú*GUFunc._get_ewise_dtypes.<locals>.<lambda>Ô   s%   € ¬
°3¼¿
¹
×(CÒ(C ð "!Ü˜C“[ð"!r&   )r�   r(   r   r)   Úappendr+   )r   r   r    ÚtysÚargtys   &&   r$   r   ÚGUFunc._get_ewise_dtypesÓ   sW   € Üñ !Ø"&ó(ˆàˆÛˆEÜ˜%¤§¡×-Ò-Ø—
‘
˜5Ÿ;™;Ö'à—
‘
˜5Ö!ñ	 ð
 ˆ
r&   c                óª   € \        V P                  P                  4      p\        V4      \        V^ ,          4      \        V^,          4      ,           8H  # r�   )r   rT   r   r�   )r   r   r‘   s   &* r$   Ú_num_args_matchÚGUFunc._num_args_matchÞ   s>   € Ü$ T×%8Ñ%8×%BÑ%BÓCˆ
Ü�4‹yœC 
¨1¥Ó.´°ZÀµ]Ó1CÕCÑCÐCr&   c                ób  € \        V P                  P                  4      pV P                  V4      p. p\	        V^ ,          4       F]  w  rV\        V4      pV^ 8X  d   VP                  W5,          4       K0  VP                  \        P                  ! W5,          VR4      4       K_  	  \        V^ ,          4      p\	        V^,          4       FO  w  rVW5V,           ,          p	\        V4      ;'       g    ^p
VP                  \        P                  ! WšR4      4       KQ  	  \        P                  ! V!  # )r   ÚA)
r   rT   r   r   r™   r�   r¼   r   r)   rŸ   )r   r   r‘   r"   Úlr¥   Úsig_dimrš   ÚoffsetÚrettyÚret_ndims   &*         r$   r­   ÚGUFunc._get_function_typeâ   sè   € Ü$ T×%8Ñ%8×%BÑ%BÓCˆ
à×,Ñ,¨TÓ2ˆð ˆÜ% j°¥mÖ4‰LˆCÜ�w“<ˆDØ�qŒyØ—‘˜Õ)Ö*à—‘œŸš [Õ%5°t¸SÓAÖBñ 5ô �Z •]Ó#ˆä% j°¥mÖ4‰LˆCØ f¥Õ-ˆEÜ˜7“|×(Ð( qˆHØ�H‰H”U—[’[ °#Ó6Ö7ñ 5ô
 �zŠz˜1‰~Ðr&   c                ó¶  € V P                   '       g   V P                  '       gQ   V'       d7   \        V^ ,          4      '       d   V^ ,          P                  ! V R.VO5/ VB # V P                  ! V/ VB # RV9   d   WP                  R4      3,          pV P                  ! V!  RJ d   RV P                   R2p\        V4      hV P                  V4      pV P                  '       d   \        V P                  V4      '       gH   V P                  V4      R8w  g"   V P                  ! V!  pV P                  V4       V P                  4        V P                  ! V/ VB # )r   Ú__call__ÚoutFz Too few arguments for function 'z'. Note that the pattern `out = gufunc(Arg1, Arg2, ..., ArgN)` is not allowed. Use `gufunc(Arg1, Arg2, ..., ArgN, out) instead.r˜   )rQ   r]   Ú_is_array_wrapperÚ__array_ufunc__rP   ÚpoprÁ   r8   Ú	TypeErrorr   r	   r   r­   rr   rb   )r   r   Úkwargsr6   Úewisert   s   &*,   r$   rÌ   ÚGUFunc.__call__ú   s>  € ð �<�<ˆ<˜tŸŸ˜÷
 Ô)¨$¨q­'×2Ò2Ø˜A•w×.Ò.Ø˜*ðØ'+òØ/5ñð ð —z’z 4Ð2¨6Ñ2Ð2Ø�fŒ_à—Z‘Z Ó&Ð(Õ(ˆDà×Ò Ñ&¨%Ó/ð
 3°4·=±=°/ð Bð ð ô
 ˜C“.Ð ð ×&Ñ& tÓ,ˆØ—
—
�
Ô7¸¿
¹
ÀE×JÒJð ×+Ñ+¨EÓ2°lÔBØ×-Ò-¨tÑ4�Ø—‘˜”Ø×ÑÔà�zŠz˜4Ð* 6Ñ*Ð*r&   )	r<   r8   rW   rQ   rS   rR   rd   rT   rP   )NNFNrL   r   )r8   r9   r:   r;   r<   r   rX   ro   Úclassmethodru   ry   rc   rr   rb   r’   r‚   rž   r³   Úpropertyr]   r   rÁ   r­   rÌ   r=   r>   )r@   s   @r$   rN   rN   ;   s…   ø‡ € ñô0ò*òð ñ	ó ð	ò4ô6ò%òòPò-.ô^&ò3ð ñ ó ð ò	òDò÷0(+ð (+r&   rN   c                ó|   € \        V \        4      '       * ;'       d!    \        V R4      ;'       d    \        V R4      # )a  Return True if obj wraps around numpy or another numpy-like library
and is likely going to apply the ufunc to the wrapped array; False
otherwise.

At the moment, this returns True for

- dask.array.Array
- dask.dataframe.DataFrame
- dask.dataframe.Series
- xarray.DataArray
- xarray.Dataset
- xarray.Variable
- pint.Quantity
- other potential wrappers around dask array or dask dataframe

We may need to add other libraries that pickle ufuncs from their
__array_ufunc__ method in the future.

Note that the below test is a lot more naive than
`dask.base.is_dask_collection`
(https://github.com/dask/dask/blob/5949e54bc04158d215814586a44d51e0eb4a964d/dask/base.py#L209-L249),  # noqa: E501
because it doesn't need to find out if we're actually dealing with
a dask collection, only that we're dealing with a wrapper.
Namely, it will return True for a pint.Quantity wrapping around a plain float, a
numpy.ndarray, or a dask.array.Array, and it's OK because in all cases
Quantity.__array_ufunc__ is going to forward the ufunc call inwards.
Ú__dask_graph__rÏ   )r(   r�   Úhasattr)Úobjs   &r$   rÎ   rÎ   %  s@   € ô: �sœDÓ!Ô!÷ 	,ð 	,Ü�CÐ)Ó*÷	,ð 	,ä�CÐ*Ó+ðr&   )Únumbar   Ú
numba.corer   Únumba.np.ufunc.ufuncbuilderr   Únumba.np.ufunc.sigparser   Únumba.np.ufunc.ufunc_baser   r   Únumba.np.numpy_supportr	   r
   r   Únumba.core.typingr   Únumba.core.typing.templatesr   r   rY   rE   rG   ÚReduceMixinrN   rÎ   rL   r&   r$   Ú<module>rä      sR   ðÝ Ý Ý 5Ý 3ß AÝ ;ß (Ý %ß CÛ ò!ôH6Ð$ô 6ôg+ˆY×"Ñ" Iô g+ôT r&   