Ë
    8Ò^j  ã                   óÊ   — d Z ddl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„Zdedeeef   d
ee   fd„ZddgZd
ee   fd„Zy)z
Internal helpers
é    N)ÚCallable)Úwraps)Ú	signature)Ú
ModuleType)ÚTypeVarÚ_TÚxpÚreturn.c                 óP   ‡ — dt         dt        f   dt         dt        f   fˆ f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                óP  •‡ — t        ‰ «      dt        dt        dt        fˆ ˆfd„«       }t        ‰ «      }|j                  |j                  j                  «       D ��cg c]  \  }}|dk7  sŒ|‘Œ c}}¬«      }|j                  €d‰ j                  › d�|_        ||_        |S c c}}w )	NÚargsÚkwargsr
   c                  ó   •—  ‰| d‰i|¤ŽS )Nr	   © )r   r   r   r	   s     €€úw/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/sklearn/externals/array_api_compat/_internal.pyÚ	wrapped_fz(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   Úinnerzget_xp.<locals>.inner    s²   ù€ Ü	ˆq‹ð	-œVð 	-¬vð 	-¼&õ 	-ó 
ð	-ô ˜‹lˆØ—+‘+Ø*-¯.©.×*>Ñ*>Ó*@×N¡  3ÀAÈÃIšÓNð ó 
ˆð ×ÑÐ$ð%%Ø%&§Z¡Z Lð 1ð!ˆIÔð #*ˆ	ÔØÐùó Os   ÁB"
Á+B"
)r   r   )r	   r    s   ` r   Úget_xpr!      s/   ø€ ð"”˜#œr˜'Ñ"ð ¬(°3¼°7Ñ*;õ ð* €Lr   Úmod_nameÚglobals_c                 ó  — t        j                  | «      }i }t        d|j                  › d�|«       t	        |«      D ]0  }|j                  d«      rŒt        ||«      sŒ"t        ||«      ||<   Œ2 |j                  |«       t        |«      S )zLImport everything from module, updating globals().
    Returns __all__.
    zfrom z	 import *Ú_)
Ú	importlibÚimport_moduleÚexecr   ÚdirÚ
startswithÚhasattrÚgetattrÚupdateÚlist)r"   r#   ÚmodÚobjsÚns        r   Úclone_moduler2   8   s€   € ô ×
!Ñ
! (Ó
+€Cð €DÜˆ5�—‘�˜iÐ	(¨$Ô/ä�‹Xò &ˆØ�|‰|˜CÕ ¤W¨S°!¥_Ü˜c 1“oˆD�ŠGð&ð ‡O�O�DÔÜ�‹:Ðr   r!   r2   c                  ó   — t         S )N)Ú__all__r   r   r   Ú__dir__r5   L   s   € Ü€Nr   )r   r&   Úcollections.abcr   Ú	functoolsr   Úinspectr   Útypesr   Útypingr   r   r!   ÚstrÚdictr   r.   r2   r4   r5   r   r   r   ú<module>r=      s�   ðñó Ý $Ý Ý Ý Ý áˆTƒ]€ð&ˆzð &˜h¨°°b°Ñ(9Ð':¸HÀSÈ"ÀWÑ<MÐ'MÑNó &ðR˜3ð ¨$¨s°F¨{Ñ*;ð ÀÀSÁ	ó ð$ �^Ð
$€ð��c‘ô r   