a
    h                     @   sp  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Z7e%e7e
j8Z8e%e7G dd de
j9Z9g dZ:dd Z;e%d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                   @   s   e Zd ZdS )parallel_backendN)__name__
__module____qualname__ r+   r+   R/var/www/html/assistant/venv/lib/python3.9/site-packages/sklearn/utils/__init__.pyr'   >   s   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                 C   s8   | dkr t dt t dkS tdt d|  d S )NZ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(   )namer+   r+   r,   __getattr__j   s    r6   z;tosequence was deprecated in 1.5 and will be removed in 1.7c                 C   s0   t | tjrt| S t | tr$| S t| S d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.
    N)
isinstancenpZndarrayZasarrayr   list)xr+   r+   r,   
tosequenceu   s
    

r;   )=__doc__r2   r/   collections.abcr   numpyr8   
exceptionsr    r   r   Z_bunchr   Z	_chunkingr	   r
   Z_estimator_html_reprr   Z	_indexingr   r   r   Z_maskr   Z_tagsr   r   r   r   r   r   r   Zclass_weightr   r   deprecationr   Z	discoveryr   Zextmathr   Z
murmurhashr   Z
validationr   r   r   r    r!   r"   r#   r$   r%   r&   msgr-   r'   __all__r6   r;   r+   r+   r+   r,   <module>   s4   $	0'