o
    \i                     @   s   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 e
dZded	eed
ef ged
ef f fddZdgZd	ee fddZdS )z
Internal helpers
    )Callable)wraps)	signature)
ModuleType)TypeVar_Txpreturn.c                    s*   dt dtf dt dtf f fdd}|S )a2  
    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                   sl   t  dtdtdtf fdd}t }|jdd |j D d}|jd u r1d	 j d
|_||_|S )Nargskwargsr	   c                     s    | di|S )Nr    )r   r   )r
   r   r   /var/www/www-root/data/www/176.119.141.140/sports-predictor/venv/lib/python3.10/site-packages/sklearn/externals/array_api_compat/_internal.py	wrapped_f    s   z(get_xp.<locals>.inner.<locals>.wrapped_fc                 S   s   g | ]
\}}|d kr|qS r   r   ).0iparr   r   r   
<listcomp>&   s    z)get_xp.<locals>.inner.<locals>.<listcomp>)
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new_sigr   )r
   r   inner   s   

zget_xp.<locals>.inner)r   r   )r   r   r   r   r   get_xp   s   &r   c                   C   s   t S )N)__all__r   r   r   r   __dir__:   s   r!   N)r   collections.abcr   	functoolsr   inspectr   typesr   typingr   r   r   r    liststrr!   r   r   r   r   <module>   s    ,)