Ë
    ÷Q(h  ã                   óX   — d dl Zd dlmZ d dlmZmZ d dlmZ d„ Z	d„ Z
d„ Zd„ Zd	„ Zd
„ Zy)é    N)Úassert_array_equal)Úattach_uniqueÚcached_unique)Úcheck_arrayc                  óÐ   — t        j                  g d¢«      } t        | «      }t        |j                  j
                  d   t        j                  g d¢«      «       t        || «       y )N©é   é   r
   é   é   r   é   Úunique©r	   r
   r   r   r   )ÚnpÚarrayr   r   ÚdtypeÚmetadata©ÚarrÚarr_s     ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sklearn/utils/tests/test_unique.pyÚ+test_attach_unique_attaches_unique_to_arrayr      sG   € Ü
�(‰(Ò(Ó
)€CÜ˜Ó€DÜ�t—z‘z×*Ñ*¨8Ñ4´b·h±hºÓ6OÔPÜ�t˜SÕ!ó    c                  ó  — t        j                  t         j                  dt        j                  ddg«      i¬«      } t        j                  g d¢| ¬«      }t	        t        |«      t        j                  ddg«      «       y )Nr   r	   r
   )r   r   )r   )r   r   Úfloat64r   r   r   )Úmy_dtyper   s     r   Ú(test_cached_unique_returns_cached_uniquer      sU   € Ü�x‰xœŸ
™
¨h¼¿¹À!ÀQÀÓ8HÐ-IÔJ€HÜ
�(‰(Ò(°Ô
9€CÜ”} SÓ)¬2¯8©8°Q¸°FÓ+;Õ<r   c                  ó.   — g d¢} t        | «      }|| u sJ ‚y)z8Test that when not np.ndarray, we don't touch the array.r   N)r   r   s     r   Útest_attach_unique_not_ndarrayr      s   € â
€CÜ˜Ó€DØ�3‰;Ð‰;r   c                  óh   — t        j                  g d¢«      } t        | «      }|j                  | u sJ ‚y)z4Test that attach_unique returns a view of the array.r   N)r   r   r   Úbaser   s     r   Útest_attach_unique_returns_viewr"      s-   € ä
�(‰(Ò(Ó
)€CÜ˜Ó€DØ�9‰9˜ÑÐÑr   c                  ó  — t        j                  g d¢«      } t        | d¬«      }t        |t        «      sJ ‚t        |«      dk(  sJ ‚t        |d   | «       t        | d¬«      }t        |t         j                  «      sJ ‚t        || «       y)z+Test return_tuple argument of the function.r   T)Úreturn_tupler	   r   FN)r   r   r   Ú
isinstanceÚtupleÚlenr   Úndarray)r   Ú	arr_tupleÚ
arr_singles      r   Útest_attach_unique_return_tupler+   #   sw   € ä
�(‰(Ò(Ó
)€CÜ˜c°Ô5€IÜ�i¤Ô'Ð'Ð'Üˆy‹>˜QÒÐÐÜ�y ‘| SÔ)ä˜s°Ô7€JÜ�j¤"§*¡*Ô-Ð-Ð-Ü�z 3Õ'r   c                  óè   — t        j                  g d¢g«      } t        | «      }t        |«      }t	        |j
                  j                  d   t        j                  g d¢«      «       t	        || «       y)z0Test that check_array keeps the unique metadata.r   r   r   N)r   r   r   r   r   r   r   r   s     r   Útest_check_array_keeps_uniquer-   0   sT   € ä
�(‰(Ò)Ð*Ó
+€CÜ˜Ó€DÜ�tÓ€DÜ�t—z‘z×*Ñ*¨8Ñ4´b·h±hºÓ6OÔPÜ�t˜SÕ!r   )Únumpyr   Únumpy.testingr   Úsklearn.utils._uniquer   r   Úsklearn.utils.validationr   r   r   r   r"   r+   r-   © r   r   ú<module>r3      s/   ðÛ Ý ,ç >Ý 0ò"ò=òòò
(ó"r   