§
    rŠtjœ  ã                   ó@   — d dl Zd dlmZ d„ Zddœd„Zd
d„Zddœd	„ZdS )é    N)Úget_namespacec                 ó  — t          | t          j        ¦  «        s| S 	 d| j        j        v r| S n# t
          t          f$ r Y nw xY wt          j        | ¦  «        }t          j        | j        d|i¬¦  «        }|                      |¬¦  «        S )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/html/CA-Chatbot/venv/lib/python3.11/site-packages/sklearn/utils/_unique.pyÚ_attach_uniquer   	   sŸ   € õ
 �a�œÑ$Ô$ð Øˆðà�q”wÔ'Ð'Ð'ØˆHð (øå�IÐ&ð ð ð Øˆðøøøõ ŒY�q‰\Œ\€FÝ”8˜AœG¨x¸Ð.@ÐAÑAÔA€LØ�6Š6˜ˆ6Ñ%Ô%Ð%s   ž/ ¯AÁAF)Úreturn_tuplec                 ór   — 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   ó4   K  — | ]}t          |¦  «        V — Œd S ©N)r   )Ú.0r   s     r   ú	<genexpr>z attach_unique.<locals>.<genexpr>8   s*   è è € Ð.Ð. a•˜qÑ!Ô!Ð.Ð.Ð.Ð.Ð.Ð.ó    é   r   ©ÚtupleÚlen)r   ÚysÚress      r   Úattach_uniquer      sA   € õ8 Ð.Ð.¨2Ð.Ñ.Ô.Ñ
.Ô
.€CÝ
ˆ3�x„x�1‚}€}˜\€}Ø�1ŒvˆØ€Jr   c                 óÐ   — 	 | j         j        � d| j         j        v r| j         j        d         S n# t          $ r Y nw xY wt          | |¬¦  «        \  }}|                     | ¦  «        S )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.
    Nr   ©Úxp)r   r   r   r   Úunique_values)r   r"   Ú_s      r   Ú_cached_uniquer%   >   s~   € ðØŒ7ÔÐ'¨H¸¼Ô8HÐ,HÐ,HØ”7Ô# HÔ-Ð-øøÝð ð ð àˆðøøøõ ˜! Ð#Ñ#Ô#�E€BˆØ×Ò˜AÑÔÐs   ‚+/ ¯
<»<r!   c                 ót   ‡ — 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   ó:   •K  — | ]}t          |‰¬ ¦  «        V — ŒdS )r!   N)r%   )r   r   r"   s     €r   r   z cached_unique.<locals>.<genexpr>i   s0   øè è € Ð5Ð5¨Q•˜q RÐ(Ñ(Ô(Ð5Ð5Ð5Ð5Ð5Ð5r   r   r   r   )r"   r   r   s   `  r   Úcached_uniquer(   Q   sD   ø€ õ0 Ð5Ð5Ð5Ð5°"Ð5Ñ5Ô5Ñ
5Ô
5€CÝ
ˆ3�x„x�1‚}€}Ø�1ŒvˆØ€Jr   r   )Únumpyr	   Úsklearn.utils._array_apir   r   r   r%   r(   © r   r   ú<module>r,      s�   ðð Ð Ð Ð à 2Ð 2Ð 2Ð 2Ð 2Ð 2ð&ð &ð &ð& %*ð ð ð ð ð ðDð ð ð ð& ð ð ð ð ð ð ð r   