
    sh                     D    S SK Jr  S SKJr   " S S5      r " S S5      rg)    )numpy_support)typesc                   $    \ rS rSrSrS rS rSrg)UfuncLowererBase   zHCallable class responsible for lowering calls to a specific gufunc.
    c                 D    Xl         X0l        U" U5      U l        / U l        g N)ufuncmake_ufunc_kernel_fnkernellibs)selfr
   make_kernel_fnr   s       m/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/numba/np/ufunc/ufunc_base.py__init__UfuncLowererBase.__init__   s     
$8!$U+	    c                 R    U R                  XX4U R                  U R                  5      $ r	   )r   r
   r   )r   contextbuildersigargss        r   __call__UfuncLowererBase.__call__   s(    ((3)-T[[B 	Br   )r   r   r   r
   N)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s    Br   r   c                       \ rS rSr\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       rS rSS jrS rSrg)	UfuncBase   c                 .    U R                   R                  $ r	   )r
   ninr   s    r   r&   UfuncBase.nin   s    zz~~r   c                 .    U R                   R                  $ r	   )r
   noutr'   s    r   r*   UfuncBase.nout   s    zzr   c                 .    U R                   R                  $ r	   )r
   nargsr'   s    r   r-   UfuncBase.nargs       zzr   c                 .    U R                   R                  $ r	   )r
   ntypesr'   s    r   r1   UfuncBase.ntypes!       zz   r   c                 .    U R                   R                  $ r	   )r
   r   r'   s    r   r   UfuncBase.types%   r/   r   c                 .    U R                   R                  $ r	   )r
   identityr'   s    r   r7   UfuncBase.identity)       zz"""r   c                 .    U R                   R                  $ r	   )r
   	signaturer'   s    r   r;   UfuncBase.signature-   s    zz###r   c                 .    U R                   R                  $ r	   )r
   
accumulater'   s    r   r>   UfuncBase.accumulate1   s    zz$$$r   c                 .    U R                   R                  $ r	   )r
   atr'   s    r   rA   UfuncBase.at5   s    zz}}r   c                 .    U R                   R                  $ r	   )r
   outerr'   s    r   rD   UfuncBase.outer9   r/   r   c                 .    U R                   R                  $ r	   )r
   reducer'   s    r   rG   UfuncBase.reduce=   r3   r   c                 .    U R                   R                  $ r	   )r
   reduceatr'   s    r   rJ   UfuncBase.reduceatA   r9   r   c                 \    [        U R                  R                  5      S:  d   eSU l        g)z9
Disable the compilation of new signatures at call time.
r   TN)len_dispatcher	overloads_frozenr'   s    r   disable_compileUfuncBase.disable_compileE   s*    
 4##--.222r   Nc                    Uc   U R                   R                  R                  n[        R                  n[        R
                  nU4U R                  R                  -  U4U R                  R                  -  -   nU4U R                  R                  -  nUR                  XE4 Vs/ s H  o`R                  X4PM     sn5        gs  snf )a  
Install an implementation function for a GUFunc/DUFunc object in the
given target context.  If no target context is given, then
_install_cg() installs into the target context of the
dispatcher object (should be same default context used by
jit() and njit()).
N)rN   targetdescrtarget_contextr   AnyArrayr
   r&   r*   insert_func_defn	_lower_me)r   	targetctx_any_arrsig0sig1r   s          r   _install_cgUfuncBase._install_cgM   s     ((44CCIyy{{w'4'DJJOO*CCw'""59LALSnnd(LA	CAs   #Cc                 F   U R                   (       aH  [        R                  " X5      nUc  g[        UR                  UR
                  -   5      S[        U5       nU R                  R                  R                  5        H   u  p4U R                  X5      (       d  M  X44s  $    g)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.
N)NN)rP   r   ufunc_find_matching_looptupleinputsoutputsrM   rN   rO   itemsmatch_signature)r   ewise_typesloopr   cress        r   find_ewise_functionUfuncBase.find_ewise_function_   s     << 99$LD|!dll :;<MS=MNK))3399;IC##K55y  < r   )rP   r	   )r   r   r   r   propertyr&   r*   r-   r1   r   r7   r;   r>   rA   rD   rG   rJ   rQ   r_   rk   r    r!   r   r   r#   r#      s            ! !     # # $ $ % %       ! ! # #C$r   r#   N)numba.npr   
numba.corer   r   r#   r!   r   r   <module>rp      s#    " B B^ ^r   