Ë
    ÷Q(hœ  ã                   ó>   — d dl Zd dlmZ d„ Zddœd„Zd
d„Zddœd	„Zy)é    N)Úget_namespacec                 ó0  — t        | t        j                  «      s| S 	 d| j                  j                  v r| S 	 t        j                  | «      }t        j                  | j                  d|i¬«      }| j                  |¬«      S # t
        t        f$ r Y Œ[w xY w)zŠAttach unique values of y to y and return the result.

    The result is a view of y, and the metadata (unique) is not attached to y.
    Úunique)Úmetadata)Údtype)	Ú
isinstanceÚnpÚndarrayr   r   ÚAttributeErrorÚ	TypeErrorr   Úview)Úyr   Úunique_dtypes      úS/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sklearn/utils/_unique.pyÚ_attach_uniquer   	   sŠ   € ô
 �aœŸ™Ô$Øˆðà�q—w‘w×'Ñ'Ñ'ØˆHð (ô
 �Y‰Y�q‹\€FÜ—8‘8˜AŸG™G¨x¸Ð.@ÔA€LØ�6‰6˜ˆ6Ó%Ð%øô œIÐ&ò Ùðús   žB ÂBÂBF)Úreturn_tuplec                 óT   — t        d„ |D «       «      }t        |«      dk(  r| s|d   S |S )aë  Attach unique values of ys to ys and return the results.

    The result is a view of y, and the metadata (unique) is not attached to y.

    IMPORTANT: The output of this function should NEVER be returned in functions.
    This is to avoid this pattern:

    .. code:: python

        y = np.array([1, 2, 3])
        y = attach_unique(y)
        y[1] = -1
        # now np.unique(y) will be different from cached_unique(y)

    Parameters
    ----------
    *ys : sequence of array-like
        Input data arrays.

    return_tuple : bool, default=False
        If True, always return a tuple even if there is only one array.

    Returns
    -------
    ys : tuple of array-like or array-like
        Input data with unique values attached.
    c              3   ó2   K  — | ]  }t        |«      –— Œ y ­w©N)r   )Ú.0r   s     r   ú	<genexpr>z attach_unique.<locals>.<genexpr>8   s   è ø€ Ò. a”˜q×!Ñ.ùs   ‚é   r   ©ÚtupleÚlen)r   ÚysÚress      r   Úattach_uniquer      s/   € ô8 Ñ.¨2Ô.Ó
.€CÜ
ˆ3ƒx�1‚}™\Ø�1‰vˆØ€Jó    c                 óò   — 	 | j                   j                  �1d| j                   j                  v r| j                   j                  d   S t        | |¬«      \  }}|j	                  | «      S # t        $ r Y Œ,w xY w)zçReturn the unique values of y.

    Use the cached values from dtype.metadata if present.

    This function does NOT cache the values in y, i.e. it doesn't change y.

    Call `attach_unique` to attach the unique values to y.
    r   ©Úxp)r   r   r   r   Úunique_values)r   r"   Ú_s      r   Ú_cached_uniquer%   >   st   € ðØ�7‰7×ÑÐ'¨H¸¿¹×8HÑ8HÑ,HØ—7‘7×#Ñ# HÑ-Ð-ô ˜! Ô#�E€BˆØ×Ñ˜AÓÐøô	 ò áðús   ‚AA* Á*	A6Á5A6r!   c                 óV   ‡ — t        ˆ fd„|D «       «      }t        |«      dk(  r|d   S |S )a€  Return the unique values of ys.

    Use the cached values from dtype.metadata if present.

    This function does NOT cache the values in y, i.e. it doesn't change y.

    Call `attach_unique` to attach the unique values to y.

    Parameters
    ----------
    *ys : sequence of array-like
        Input data arrays.

    xp : module, default=None
        Precomputed array namespace module. When passed, typically from a caller
        that has already performed inspection of its own inputs, skips array
        namespace inspection.

    Returns
    -------
    res : tuple of array-like or array-like
        Unique values of ys.
    c              3   ó8   •K  — | ]  }t        |‰¬ «      –— Œ y­w)r!   N)r%   )r   r   r"   s     €r   r   z cached_unique.<locals>.<genexpr>i   s   øè ø€ Ò5¨Q”˜q R×(Ð(Ñ5ùs   ƒr   r   r   )r"   r   r   s   `  r   Úcached_uniquer(   Q   s.   ø€ ô0 Ó5°"Ô5Ó
5€CÜ
ˆ3ƒx�1‚}Ø�1‰vˆØ€Jr   r   )Únumpyr	   Úsklearn.utils._array_apir   r   r   r%   r(   © r   r   ú<module>r,      s,   ðó å 2ò&ð& %*ô óDð& õ r   