+
    ,i                     t    R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ]
! R4      tR R ltR	.tR
 R ltR# )z
Internal helpers
)Callable)wraps)	signature)
ModuleType)TypeVar_Tc                    V ^8  d   QhR\         R\        \        R\        3,          .\        R\        3,          3,          /# )   xpreturn.)r   r   r   )formats   "G/usr/lib/python3/dist-packages/scipy/_lib/array_api_compat/_internal.py__annotate__r      s9     & &z &hb(9':HS"W<M'MN &    c                   a  R V 3R llpV# )a  
Decorator to automatically replace xp with the corresponding array module.

Use like

import numpy as np

@get_xp(np)
def func(x, /, xp, kwarg=None):
    return xp.func(x, kwarg=kwarg)

Note that xp must be a keyword argument and come after all non-keyword
arguments.

c                d    V ^8  d   QhR\         R\        3,          R\         R\        3,          /# )r	   f.r   )r   r   )r   s   "r   r   get_xp.<locals>.__annotate__   s,      #r'" (37*; r   c                <  <a  \        S 4      R  V V3R ll4       p\        S 4      pTP                  VP                  P	                  4        UUu. uF  w  r4VR8w  g   K  VNK  	  uppR7      pVP
                  f   RS P                   R2Vn        WQn        V# u uppi )c                <    V ^8  d   QhR\         R\         R\         /# )r	   argskwargsr   )object)r   s   "r   r   +get_xp.<locals>.inner.<locals>.__annotate__!   s!     	- 	-V 	-v 	-& 	-r   c                     < S! V R S/VB # )r
    )r   r   r   r
   s   *,r   	wrapped_f(get_xp.<locals>.inner.<locals>.wrapped_f    s    d,r,V,,r   r
   )
parametersz$Array API compatibility wrapper for zk.

See the corresponding documentation in NumPy/CuPy and/or the array API
specification for more details.

)r   r   replacer   items__doc____name____signature__)r   r   sigiparnew_sigr
   s   b     r   innerget_xp.<locals>.inner   s    	q	- 	- 
	- l++*-..*>*>*@N*@AI*@N  
 $%%%&ZZL 1!I #* Os   B
B
r   )r
   r(   s   f r   get_xpr*      s    " * Lr   r*   c                :    V ^8  d   QhR\         \        ,          /# )r	   r   )liststr)r   s   "r   r   r   :   s      c r   c                      \         # )N)__all__r   r   r   __dir__r0   :   s    Nr   N)r!   collections.abcr   	functoolsr   inspectr   typesr   typingr   r   r*   r/   r0   r   r   r   <module>r6      s8    %    T]&R *r   