
    -i                         SS jr SS jrg )Nc                    Ucs  [        U S5      (       a6  [        U R                  S5      (       a  U R                  R                  5       nOM[        U R                  S   5       Vs/ s H  nSU 3PM
     nnO![        US5      (       a  UR                  5       n[        [        U5      5      [        U5      :w  a  [        S5      eU$ s  snf )a  Check feature names.

Parameters
----------
X : array-like of shape (n_samples, n_features)
    Input data.

feature_names : None or array-like of shape (n_names,), dtype=str
    Feature names to check or `None`.

Returns
-------
feature_names : list of str
    Feature names validated. If `feature_names` is `None`, then a list of
    feature names is provided, i.e. the column names of a pandas dataframe
    or a generic list of feature names (e.g. `["x0", "x1", ...]`) for a
    NumPy array.
columnstolist   xz,feature_names should not contain duplicates.)hasattrr   r   rangeshapelenset
ValueError)Xfeature_namesis      O/var/www/html/venv/lib/python3.13/site-packages/sklearn/inspection/_pd_utils.py_check_feature_namesr      s    & 1i  WQYY%A%AII,,.M /4AGGAJ.?@.?qW.?M@M		)	)%,,.
3}#m"44GHH As   %Cc                     [        U [        5      (       a%  Uc  [        SU < S35      e UR                  U 5      $ U $ ! [         a  n[        SU < S35      UeSnAff = f)zGet feature index.

Parameters
----------
fx : int or str
    Feature index or name.

feature_names : list of str, default=None
    All feature names from which to search the indices.

Returns
-------
idx : int
    Feature index.
Nz+Cannot plot partial dependence for feature z since the list of feature names was not provided, neither as column names of a pandas data-frame nor via the feature_names parameter.zFeature z not in feature_names)
isinstancestrr   index)fxr   es      r   _get_feature_indexr   (   s      "c =bV D  	L &&r** I  	Lxv-BCD!K	Ls   = 
AAA)N)r   r        r   <module>r      s   
 Fr   