
    -i                     \   S SK rS SKrS SKJr  S SKJrJr  \R                  R                  S\
S/\
S/\S/45      S 5       r\R                  R                  S0 \R                  4S	\R                  " \R                  5      R                  0\R                  4S	\R                  " \R                  5      R                  S-   0\R                   4/5      S
 5       r\R                  R                  SS\R$                  " SS/\R                   S90\R                   4S\R$                  " SS/\R                  S9\R$                  " SS/\R                   S940\R                   4S\R$                  " SS/\R                  S9\R$                  " SS/\R                  S940\R                  4S\R$                  " SS/\R&                  S90\R                  4\R$                  " SS/\R                  S9\R                  " \R                  5      R                  S-   S.\R                   4/5      S 5       r\R                  R                  S\R$                  " / \R                   S9\R$                  " / \R                   S94SS.\R                  4\R$                  " S/\R                   S9SS.\R                  4\R$                  " \R                  " \R                  5      R                  S-   /\R*                  S9SS.\R                   4\R$                  " S/\R                  S9S\R                  " \R                  5      R                  S-   S.\R                   4\R$                  " \R                  " \R                  5      R                  S-   /\R*                  S9SSS.\R                   4/5      S 5       r\R                  R                  SS	\R                  " \R                   5      R                  S-   0\S4S\R$                  " SS/\R0                  S90\S4SSS/0\S4/5      S 5       rg)    N)assert_array_equal)_object_dtype_isnan _smallest_admissible_index_dtypez
dtype, val   ac                     [         R                  " U[         R                  /[         R                  U//U S9n[         R                  " SS/SS//5      n[        U5      n[	        XC5        g )NdtypeFT)nparraynanr   r   )r
   valXexpected_maskmasks        Q/var/www/html/venv/lib/python3.13/site-packages/sklearn/utils/tests/test_fixes.pytest_object_dtype_isnanr      sT    
3-"&&#/u=AHHudmdE];<Mq!Dt+    zparams, expected_dtypemaxvalc                 &    [        S0 U D6U:X  d   eg)zdCheck the behaviour of `smallest_admissible_index_dtype` depending only on the
`max_val` parameter.
N r   paramsexpected_dtypes     r   ,test_smallest_admissible_index_dtype_max_valr      s     ,5f5GGGr   arrays   r	   )r   r   c                 &    [        S0 U D6U:X  d   eg)zCheck the behaviour of `smallest_admissible_index_dtype` using the passed
arrays but without checking the contents of the arrays.
Nr   r   r   s     r   >test_smallest_admissible_index_dtype_without_checking_contentsr    %   s    \ ,5f5GGGr   T)r   check_contents)r   r!   r   c                 &    [        S0 U D6U:X  d   eg)zqCheck the behaviour of `smallest_admissible_index_dtype` using the dtype of the
arrays but as well the contents.
Nr   r   r   s     r   9test_smallest_admissible_index_dtype_by_checking_contentsr#   V   s    h ,5f5GGGr   zparams, err_type, err_msgz)is to large to be represented as np.int64z$Array dtype float64 is not supportedz#Arrays should be of type np.ndarrayc                 v    [         R                  " XS9   [        S0 U D6  SSS5        g! , (       d  f       g= f)z-Check that we raise the proper error message.)matchNr   )pytestraisesr   )r   err_typeerr_msgs      r   *test_smallest_admissible_index_dtype_errorr*      s'    $ 
x	/(262 
0	/	/s   *
8)numpyr   r&   sklearn.utils._testingr   sklearn.utils.fixesr   r   markparametrizeobjectfloatr   int32iinfomaxint64r   r   int8r    uint32r#   
ValueErrorfloat64	TypeErrorr*   r   r   r   <module>r;      s%     5 U fc]UAJ'OP, Q, 	RXX
BHHRXX&**	+RXX6
BHHRXX&**Q.	/:HH  BHHaV2884	5rxx@
 HHaV2884HHaV2884 HH	
 HHaV2884HHaV2884 HH	
 BHHaV2773	4bhh?
 ((Aq6:((288,0014 HH	
;$'PHQ'PH 
 88Bbhh7"BHH9UV"& HH	
 xx2884MHH	
 ((BHHRXX$6$:$:Q$>#?ryyQ"& HH	
 ((A3bhh7"&((288,0014
 HH	
 ((BHHRXX$6$:$:Q$>#?ryyQ"&
 HH	
I,/`Ha/`H  rxx)--127	
 rxxAbjj9:2	

 QF	Y(MN 3! 3r   