a
    �ù»j’  ã                   @   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+   ú<E:\soccer\ml_env\Lib\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'