
    0Ph                        d Z ddlZddlZddlmZ ddlZddlmZ ddl	m
Z
mZ ddlmZ dd	lmZmZ dd
lmZ ddlmZmZmZ ddlmZ ddlmZmZmZmZmZmZm Z  ddl!m"Z"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 dZ7  e%e7          e
j8                  Z8 e%e7           G d de
j9                              Z9g dZ:d Z; e%d          d             Z<dS )z+Various utilities to help with development.    N)Sequence   )DataConversionWarning   )_joblibmetadata_routing)Bunch)gen_batchesgen_even_slices)estimator_html_repr)_safe_indexingresampleshuffle)	safe_mask)ClassifierTags	InputTagsRegressorTagsTags
TargetTagsTransformerTagsget_tags)compute_class_weightcompute_sample_weight)
deprecated)all_estimators)safe_sqr)murmurhash3_32)
as_float_arrayassert_all_finitecheck_arraycheck_consistent_lengthcheck_random_statecheck_scalarcheck_symmetric	check_X_ycolumn_or_1d	indexablez>deprecated in 1.5 to be removed in 1.7. Use joblib.{} instead.c                       e Zd ZdS )parallel_backendN)__name__
__module____qualname__     V/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sklearn/utils/__init__.pyr)   r)   >   s        Dr.   r)   )"r   r   r   r    r"   r   r   r&   r!   r%   r#   r'   r$   r   r)   register_parallel_backendr   r   r   r   r   r	   r   r   r   r
   r   r   r   r   r   r   r   r   c                     | dk    r1t          j        dt                     t          j                    dk    S t          dt           d|            )NIS_PYPYz1IS_PYPY is deprecated and will be removed in 1.7.PyPyzmodule z has no attribute )warningswarnFutureWarningplatformpython_implementationAttributeErrorr*   )names    r/   __getattr__r;   j   s\    y?	
 	
 	
 -//699
E8EEtEE
F
FFr.   z;tosequence was deprecated in 1.5 and will be removed in 1.7c                     t          | t          j                  rt          j        |           S t          | t                    r| S t          |           S )a  Cast iterable x to a Sequence, avoiding a copy if possible.

    Parameters
    ----------
    x : iterable
        The iterable to be converted.

    Returns
    -------
    x : Sequence
        If `x` is a NumPy array, it returns it as a `ndarray`. If `x`
        is a `Sequence`, `x` is returned as-is. If `x` is from any other
        type, `x` is returned casted as a list.
    )
isinstancenpndarrayasarrayr   list)xs    r/   
tosequencerC   u   sH      !RZ   z!}}	Ax	 	  Awwr.   )=__doc__r7   r4   collections.abcr   numpyr>   
exceptionsr    r   r   _bunchr	   	_chunkingr
   r   _estimator_html_reprr   	_indexingr   r   r   _maskr   _tagsr   r   r   r   r   r   r   class_weightr   r   deprecationr   	discoveryr   extmathr   
murmurhashr   
validationr   r   r    r!   r"   r#   r$   r%   r&   r'   msgr0   r)   __all__r;   rC   r-   r.   r/   <module>rW      s   1 1
   $ $ $ $ $ $     . . . . . . ' ' ' ' ' ' ' '       3 3 3 3 3 3 3 3 5 5 5 5 5 5         
                        F E E E E E E E # # # # # # % % % % % %       & & & & & &                        G+JJsOOG,MNN  C	 	 	 	 	w/ 	 	 	# # #NG G G IJJ  KJ  r.   