
    -i                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  \
" S5      rS\S	\\S
\4   /\S
\4   4   4S jrS/rS	\\   4S jrg)z
Internal helpers
    )Callable)wraps)	signature)
ModuleType)TypeVar_Txpreturn.c                 T   ^  S[         S[        4   S[         S[        4   4U 4S jjnU$ )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.

f.r
   c                V  >^  [        T 5      S[        S[        S[        4U U4S jj5       n[        T 5      nUR                  UR                  R                  5        VVs/ s H  u  p4US:w  d  M  UPM     snnS9nUR                  c  ST R                   S3Ul        XQl        U$ s  snnf )	Nargskwargsr
   c                     > T" U ST0UD6$ )Nr	    )r   r   r   r	   s     _/var/www/html/venv/lib/python3.13/site-packages/sklearn/externals/array_api_compat/_internal.py	wrapped_f(get_xp.<locals>.inner.<locals>.wrapped_f    s    d,r,V,,    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   objectr   replacer   items__doc____name____signature__)r   r   sigiparnew_sigr	   s   `     r   innerget_xp.<locals>.inner   s    	q	-V 	-v 	-& 	- 
	- l++*-..*>*>*@N*@AI*@N  
 $%%%&ZZL 1!I #* Os   B%
/B%
)r   r   )r	   r!   s   ` r   get_xpr#      s/    "#r'" (37*; * Lr   r#   c                      [         $ )N)__all__r   r   r   __dir__r&   :   s    Nr   N)r   collections.abcr   	functoolsr   inspectr   typesr   typingr   r   r#   r%   liststrr&   r   r   r   <module>r.      sp    %    T]&z &hb(9':HS"W<M'MN &R *c r   