
    -ih              	       \   S SK rS SKrS SKJrJr  S SKJr  \R                  R                  SSS/ SQ4SS/ SQ4\R                  " / SQ5      S/ SQ4/5      S	 5       rS
 r\R                  R                  S/ SQ5      S 5       r\R                  R                  SSS/ SQS4/5      S 5       rg)    N)_check_feature_names_get_feature_index)_convert_containerz1feature_names, array_type, expected_feature_namesarray)x0x1x2	dataframeabcc                     [         R                  R                  SS5      n/ SQn[        X1US9n[	        X05      nXR:X  d   eg )N
      r   )constructor_namecolumns_name)nprandomrandnr   r   )feature_names
array_typeexpected_feature_namesXcolumn_namesfeature_names_validateds         Y/var/www/html/venv/lib/python3.13/site-packages/sklearn/inspection/tests/test_pd_utils.pytest_check_feature_namesr      s@     			AA"L1UA21D"<<<    c                      [         R                  R                  SS5      n / SQnSn[        R                  " [
        US9   [        X5        S S S 5        g ! , (       d  f       g = f)Nr   r   )r   r   r   r   z,feature_names should not contain duplicates.match)r   r   r   pytestraises
ValueErrorr   )r   r   msgs      r   test_check_feature_names_errorr'      sB    
		AA(M
8C	z	-Q. 
.	-	-s    A
A#zfx, idx))r   r   )   r(   )r   r   )r   r(   )r      c                 .    / SQn[        X5      U:X  d   eg )Nr   )r   )fxidxr   s      r   test_get_feature_indexr-       s    #Mb0C777r   zfx, feature_names, err_msg)r   Nz.Cannot plot partial dependence for feature 'a'dz Feature 'd' not in feature_namesc                     [         R                  " [        US9   [        X5        S S S 5        g ! , (       d  f       g = f)Nr!   )r#   r$   r%   r   )r+   r   err_msgs      r   test_get_feature_names_errorr1   &   s&     
z	12- 
2	1	1s   /
=)numpyr   r#   sklearn.inspection._pd_utilsr   r   sklearn.utils._testingr   markparametrizer   r   r'   r-   r1    r   r   <module>r8      s      Q 5 7	w*+	{O,	/	"G_===/ $RS8 T8
  E	oAB..r   