ó
    ¦ñ:iáž  ã                   ó  • S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJr	  SSK
r
SSKrSSKrSSKrSSKrSSKrSSKJr  SSKJr  SSKJr  SSKJr  SSKJrJrJrJr  SSKJr  SSKrSSKrSSKr SS	K!J"r#  SS
K!J$r$J%r%J&r&J'r'J(r(J)r)  SSK*r*SSK+J,r,  SSK-J.r.J/r/J0r0J1r1J2r2J3r3  SSK4J5r5  SSK6J7r7J8r8J9r9  / SQr:\" S5      r;\;Rx                  r=\R|                  R~                  r?\;R€                  rA\;R„                  rC\CrDS\E4S jrF " S S5      rGS rH S9S jr"S:S jrIS;S jrJ \," S5        SrK SSKMrM\MRœ                  RŸ                  \.SS9rP\MRœ                  R£                  \/SS9rR\MRœ                  R£                  \1" 5       SS9rS\MRœ                  RŸ                  \R¨                  Rª                  (       + SS9rV\MRœ                  RŸ                  \K(       + SS9rW\MRœ                  RŸ                  \R°                  S :H  S!S9rYS" rZS<S# jr[ " S$ S%5      r\S=S& jr]S<S' jr^S( r_S>S) jr`S?S* jra    S@S+ jrbSAS, jrc " S- S.\RÈ                  5      re " S/ S05      rf " S1 S25      rg " S3 S45      rhS5 riS6 rjS7 rkS8 rlg! \L a    SrK GNSf = f! \L a     NŽf = f)BzTesting utilities.é    N)ÚIterable)Ú	dataclass©Úwraps)Ú	signature)ÚSTDOUTÚCalledProcessErrorÚTimeoutExpiredÚcheck_output)ÚTestCase)Úassert_allclose)Úassert_almost_equalÚassert_approx_equalÚassert_array_almost_equalÚassert_array_equalÚassert_array_lessÚassert_no_warnings)Ú_check_array_api_dispatch)Ú	_IS_32BITÚ_IS_PYPYÚVisibleDeprecationWarningÚ#_in_unstable_openblas_configurationÚparse_versionÚ
sp_version)Úcheck_classification_targets)Úcheck_arrayÚcheck_is_fittedÚ	check_X_y)Úassert_raisesÚassert_raises_regexpr   r   r   r   r   r   Ú'assert_run_python_script_without_outputr   ÚSkipTestÚ__init__c                 óî   • [        U [        5      (       a9  [        U [        5      (       a$  U R                  n[        SR                  US95      e[        U 5      (       a  [        US9" U 5      $ [        US9$ )aÌ  Context manager and decorator to ignore warnings.

Note: Using this (in both variants) will clear all warnings
from all python modules loaded. In case you need to test
cross-module-warning-logging, this is not your tool of choice.

Parameters
----------
obj : callable, default=None
    callable where you want to ignore the warnings.
category : warning class, default=Warning
    The category to filter. If Warning, all categories will be muted.

Examples
--------
>>> import warnings
>>> from sklearn.utils._testing import ignore_warnings
>>> with ignore_warnings():
...     warnings.warn('buhuhuhu')

>>> def nasty_warn():
...     warnings.warn('buhuhuhu')
...     print(42)

>>> ignore_warnings(nasty_warn)()
42
zØ'obj' should be a callable where you want to ignore warnings. You passed a warning class instead: 'obj={warning_name}'. If you want to pass a warning class to ignore_warnings, you should use 'category={warning_name}')Úwarning_name©Úcategory)	Ú
isinstanceÚtypeÚ
issubclassÚWarningÚ__name__Ú
ValueErrorÚformatÚcallableÚ_IgnoreWarnings)Úobjr'   r%   s      ÚY/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/sklearn/utils/_testing.pyÚignore_warningsr3   Y   sn   € ô8 �#”t×Ñ¤¨C´×!9Ñ!9ð —|‘|ˆÜð7÷ 8>±vÈ<°vÐ7Xó	
ð 	
ô 
�#�‰Ü¨Ò1°#Ó6Ð6ä¨Ñ1Ð1ó    c                   ó6   • \ rS rSrSrS rS rS rS rS r	Sr
g	)
r0   é…   aX  Improved and simplified Python warnings context manager and decorator.

This class allows the user to ignore the warnings raised by a function.
Copied from Python 2.7.5 and modified as required.

Parameters
----------
category : tuple of warning class, default=Warning
    The category to filter. By default, all the categories will be muted.

c                 ój   • SU l         [        R                  S   U l        SU l        / U l        Xl        g )NTÚwarningsF)Ú_recordÚsysÚmodulesÚ_moduleÚ_enteredÚlogr'   ©Úselfr'   s     r2   r#   Ú_IgnoreWarnings.__init__’   s,   € ØˆŒÜ—{‘{ :Ñ.ˆŒØˆŒØˆŒØ �r4   c                 ó4   ^ ^• [        T5      UU 4S j5       nU$ )z<Decorator to catch and hide warnings without visual nesting.c                  ó¶   >• [         R                  " 5          [         R                  " STR                  5        T" U 0 UD6sS S S 5        $ ! , (       d  f       g = f)NÚignore)r8   Úcatch_warningsÚsimplefilterr'   )ÚargsÚkwargsÚfnr@   s     €€r2   ÚwrapperÚ)_IgnoreWarnings.__call__.<locals>.wrapperœ   s<   ø€ ä×(Ò(Õ*Ü×%Ò% h°·±Ô>Ù˜4Ð* 6Ñ*÷ +×*×*ús   —)A
Á

Ar   )r@   rI   rJ   s   `` r2   Ú__call__Ú_IgnoreWarnings.__call__™   s"   ù€ ô 
ˆr‹õ	+ó 
ð	+ð
 ˆr4   c                 ó"  • / nU R                   (       a  UR                  S5        U R                  [        R                  S   La  UR                  SU R                  -  5        [        U 5      R                  nU< SSR                  U5      < S3$ )Nzrecord=Truer8   z	module=%rÚ(z, Ú))r9   Úappendr<   r:   r;   r)   r,   Újoin)r@   rG   Únames      r2   Ú__repr__Ú_IgnoreWarnings.__repr__¤   sf   € ØˆØ�<�<Ø�K‰K˜Ô&Ø�<‰<œsŸ{™{¨:Ñ6Ò6Ø�K‰K˜ d§l¡lÑ2Ô3Ü�D‹z×"Ñ"ˆÛ §¡¨4¦Ð1Ð1r4   c                 ó:  • U R                   (       a  [        SU -  5      eSU l         U R                  R                  U l        U R                  S S  U R                  l        U R                  R
                  U l        [        R                  " SU R                  5        g )NzCannot enter %r twiceTrD   )
r=   ÚRuntimeErrorr<   ÚfiltersÚ_filtersÚshowwarningÚ_showwarningr8   rF   r'   )r@   s    r2   Ú	__enter__Ú_IgnoreWarnings.__enter__­   sm   € Ø�=�=ÜÐ6¸Ñ=Ó>Ð>ØˆŒØŸ™×,Ñ,ˆŒØ#Ÿ}™}©QÐ/ˆ�‰ÔØ ŸL™L×4Ñ4ˆÔÜ×Ò˜h¨¯©Õ6r4   c                 óÌ   • U R                   (       d  [        SU -  5      eU R                  U R                  l        U R
                  U R                  l        / U R                  S S & g )Nz%Cannot exit %r without entering first)r=   rW   rY   r<   rX   r[   rZ   r>   )r@   Úexc_infos     r2   Ú__exit__Ú_IgnoreWarnings.__exit__¶   sI   € Ø�}�}ÜÐFÈÑMÓNÐNØ#Ÿ}™}ˆ�‰ÔØ#'×#4Ñ#4ˆ�‰Ô Øˆ�‰‘‰r4   )r=   rY   r<   r9   r[   r'   r>   N)r,   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r#   rL   rT   r\   r`   Ú__static_attributes__© r4   r2   r0   r0   …   s    † ñ
ò!ò	ò2ò7õr4   r0   c                 ó,  •  U" U0 UD6  [        U [        5      (       a  SR                  S U  5       5      nOU R                  n[	        U< SUR                  < 35      e! U  a-  n[        U5      nX;  a  [	        SU< SU< 35      e SnAgSnAff = f)a~  Helper function to test the message raised in an exception.

Given an exception, a callable to raise the exception, and
a message string, tests that the correct exception is raised and
that the message is a substring of the error thrown. Used to test
that the specific message thrown during an exception is correct.

Parameters
----------
exceptions : exception or tuple of exception
    An Exception object.

message : str
    The error message or a substring of the error message.

function : callable
    Callable object to raise error.

*args : the positional arguments to `function`.

**kwargs : the keyword arguments to `function`.
z or c              3   ó8   #   • U  H  oR                   v •  M     g 7f©N)r,   )Ú.0Úes     r2   Ú	<genexpr>Ú'assert_raise_message.<locals>.<genexpr>á   s   é € Ð?²J¨q§
¦
²Jùs   ‚z not raised by z4Error message does not include the expected string: z. Observed error message: N)r(   ÚtuplerR   r,   ÚAssertionErrorÚstr)Ú
exceptionsÚmessageÚfunctionrG   rH   Únamesrl   Úerror_messages           r2   Úassert_raise_messagerw   ¾   s—   € ð.QÙ�$Ð!˜&Ò!ô �j¤%×(Ñ(Ø—K‘KÑ?±JÓ?Ó?‰Eà×'Ñ'ˆEä³e¸X×=NÓ=NÐOÓPÐPøð ó Ü˜A›ˆØÓ'Ý ã=DÂmðUóð ô (ûðús   ‚A  Á BÁ&#BÂBTc           
      ó   • / n[         R                  " U 5      [         R                  " U5      pU R                  UR                  /nUc2  U Vs/ s H  oˆ[         R                  :X  a  SOSPM     n	n[	        U	5      n[        U UUUUUUS9  gs  snf )aÍ  dtype-aware variant of numpy.testing.assert_allclose

This variant introspects the least precise floating point dtype
in the input argument and automatically sets the relative tolerance
parameter to 1e-4 float32 and use 1e-7 otherwise (typically float64
in scikit-learn).

`atol` is always left to 0. by default. It should be adjusted manually
to an assertion-specific value in case there are null values expected
in `desired`.

The aggregate tolerance is `atol + rtol * abs(desired)`.

Parameters
----------
actual : array_like
    Array obtained.
desired : array_like
    Array desired.
rtol : float, optional, default=None
    Relative tolerance.
    If None, it is set based on the provided arrays' dtypes.
atol : float, optional, default=0.
    Absolute tolerance.
equal_nan : bool, optional, default=True
    If True, NaNs will compare equal.
err_msg : str, optional, default=''
    The error message to be printed in case of failure.
verbose : bool, optional, default=True
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
    If actual and desired are not equal up to specified precision.

See Also
--------
numpy.testing.assert_allclose

Examples
--------
>>> import numpy as np
>>> from sklearn.utils._testing import assert_allclose
>>> x = [1e-5, 1e-3, 1e-1]
>>> y = np.arccos(np.cos(x))
>>> assert_allclose(x, y, rtol=1e-5, atol=0)
>>> a = np.full(shape=10, fill_value=1e-5, dtype=np.float32)
>>> assert_allclose(a, 1e-5)
Ng-Cëâ6?çH¯¼šò×z>)ÚrtolÚatolÚ	equal_nanÚerr_msgÚverbose)ÚnpÚ
asanyarrayÚdtypeÚfloat32ÚmaxÚnp_assert_allclose)
ÚactualÚdesiredrz   r{   r|   r}   r~   Údtypesr�   Úrtolss
             r2   r   r   è   sˆ   € ðj €Fä—m’m FÓ+¬R¯]ª]¸7Ó-CˆGØ�l‰l˜GŸM™MÐ*€Fà�|ÙDJÓKÂF¸5¤"§*¡*Ó,‘°$Ò6ÁFˆÐKÜ�5‹zˆäØØØØØØØóùò Ls   Á!Bc                 óŽ  • [         R                  R                  U 5      (       aÃ  [         R                  R                  U5      (       aŸ  U R                  5       n UR                  5       nU R	                  5         UR	                  5         [        U R                  UR                  US9  [        U R                  UR                  US9  [        U R                  UR                  X#US9  g[         R                  R                  U 5      (       d0  [         R                  R                  U5      (       d  [        XX#US9  g[        S5      e)a@  Assert allclose for sparse and dense data.

Both x and y need to be either sparse or dense, they
can't be mixed.

Parameters
----------
x : {array-like, sparse matrix}
    First array to compare.

y : {array-like, sparse matrix}
    Second array to compare.

rtol : float, default=1e-07
    relative tolerance; see numpy.allclose.

atol : float, default=1e-9
    absolute tolerance; see numpy.allclose. Note that the default here is
    more tolerant than the default for numpy.testing.assert_allclose, where
    atol=0.

err_msg : str, default=''
    Error message to raise.
)r}   )rz   r{   r}   zGCan only compare two sparse matrices, not a sparse matrix and an array.N)ÚspÚsparseÚissparseÚtocsrÚsum_duplicatesr   ÚindicesÚindptrr   Údatar-   )ÚxÚyrz   r{   r}   s        r2   Úassert_allclose_dense_sparser”   1  sÞ   € ô2 
‡y�y×Ñ˜!×Ñ¤§¡×!3Ñ!3°A×!6Ñ!6Ø�G‰G‹IˆØ�G‰G‹IˆØ	×ÑÔØ	×ÑÔÜ˜1Ÿ9™9 a§i¡i¸ÒAÜ˜1Ÿ8™8 Q§X¡X°wÒ?Ü˜Ÿ™ §¡¨TÀgÓNÜ�Y‰Y×Ñ ×"Ñ"¬2¯9©9×+=Ñ+=¸a×+@Ñ+@ä˜ 4¸GÓDäØUó
ð 	
r4   c                 óL   • SU R                  5       ;   a  U R                  US9  gg)aZ  Set random state of an estimator if it has the `random_state` param.

Parameters
----------
estimator : object
    The estimator.
random_state : int, RandomState instance or None, default=0
    Pseudo random number generator state.
    Pass an int for reproducible results across multiple function calls.
    See :term:`Glossary <random_state>`.
Úrandom_state)r–   N)Ú
get_paramsÚ
set_params)Ú	estimatorr–   s     r2   Úset_random_staterš   [  s+   € ð ˜×-Ñ-Ó/Ó/Ø×Ñ¨,ÐÒ7ð 0r4   Fzskipped on 32bit platforms)Úreasonznot compatible with PyPyz+OpenBLAS is unstable for this configurationzjoblib is in serial modezErequires array_api_compat installed and a new enough version of NumPyÚdarwinz)Possible multi-process bug with some BLASc                  óv   • [        [        R                  R                  SS5      5      (       a  [	        S5      eg )NÚSKLEARN_SKIP_NETWORK_TESTSr   z-Text tutorial requires large dataset download)ÚintÚosÚenvironÚgetr"   rg   r4   r2   Úcheck_skip_networkr£   œ  s.   € Ü
Œ2�:‰:�>‰>Ð6¸Ó:×;Ñ;ÜÐFÓGÐGð <r4   c                 óà   •  [         R                  R                  U 5      (       a  [        R                  " U 5        gg! [
         a%    U(       a  [        R                  " SU -  5         g gf = f)zmUtility function to cleanup a temporary folder if still existing.

Copy from joblib.pool (for independence).
z$Could not delete temporary folder %sN)r    ÚpathÚexistsÚshutilÚrmtreeÚOSErrorr8   Úwarn)Úfolder_pathrª   s     r2   Ú_delete_folderr¬   ¡  s[   € ð
PÜ�7‰7�>‰>˜+×&Ñ&ô �MŠM˜+Õ&ð 'øô ó PÞÜ�MŠMÐ@À;ÑNÖOñ ðPús   ‚:> ¾*A-Á,A-c                   ó.   • \ rS rSrSrSS jrS rS rSrg)	Ú
TempMemmapi°  z9
Parameters
----------
data
mmap_mode : str, default='r'
c                 ó   • X l         Xl        g rj   )Ú	mmap_moder‘   )r@   r‘   r°   s      r2   r#   ÚTempMemmap.__init__¸  s   € Ø"ŒØ�	r4   c                 óR   • [        U R                  U R                  SS9u  ol        U$ )NT)r°   Úreturn_folder)Úcreate_memmap_backed_datar‘   r°   Útemp_folder)r@   Údata_read_onlys     r2   r\   ÚTempMemmap.__enter__¼  s)   € Ü+DØ�I‰I §¡¸tñ,
Ñ(ˆÔ(ð Ðr4   c                 ó.   • [        U R                  5        g rj   )r¬   rµ   )r@   Úexc_typeÚexc_valÚexc_tbs       r2   r`   ÚTempMemmap.__exit__Â  s   € Ü�t×'Ñ'Õ(r4   )r‘   r°   rµ   N)Úr)	r,   rb   rc   rd   re   r#   r\   r`   rf   rg   r4   r2   r®   r®   °  s   † ñôòõ)r4   r®   c                 ó(  • [         R                  " SS9n[        R                  " [        R
                  " [        USS95        [        R                  " US5      n[        R                  " X5        [        R                  " XAS9nU(       d  UnU$ XS4nU$ )z^
Parameters
----------
data
mmap_mode : str, default='r'
return_folder :  bool, default=False
Úsklearn_testing_)ÚprefixT)rª   zdata.pkl)r°   )ÚtempfileÚmkdtempÚatexitÚregisterÚ	functoolsÚpartialr¬   ÚoprR   ÚjoblibÚdumpÚload)r‘   r°   r³   rµ   ÚfilenameÚmemmap_backed_dataÚresults          r2   r´   r´   Æ  s‚   € ô ×"Ò"Ð*<Ñ=€KÜ
‡O‚O”I×%Ò%¤n°kÈÑMÔNÜ�wŠw�{ JÓ/€HÜ
‡K‚K�ÔÜŸš XÑCÐæ"/Ðð ð €Mð 7IÐ5Vð ð €Mr4   c                 óÆ  •  [        U 5      R                  nUR                  5        VVs/ s H/  u  p4UR                  UR
                  UR                  4;  d  M-  UPM1     nnnU(       aZ  UR                  5        Vs/ s H+  nUR                  UR
                  :X  d  M  UR                  PM-     nn[        U5      S:X  a  SnXQ4$ U$ ! [         a    / s $ f = fs  snnf s  snf )z!Helper to get function arguments.r   N)
r   Ú
parametersr-   ÚitemsÚkindÚVAR_POSITIONALÚVAR_KEYWORDÚvaluesrS   Úlen)rt   ÚvarargsÚparamsÚkeyÚparamrG   s         r2   Ú	_get_argsrÚ   Ü  sâ   € ðÜ˜8Ó$×/Ñ/ˆð !Ÿ,™,œ.ôâ(‰JˆCØ�:‰:˜e×2Ñ2°E×4EÑ4EÐFÑF÷ 	Ù(ð 	ñ ö
 ð  Ÿ™œó
â(�Ø�z‰z˜U×1Ñ1Ñ1ó ˆE�JŒJÙ(ð 	ð 
ô
 ˆw‹<˜1ÓØˆGØˆ}Ðàˆøô% ó àŠ	ðüóùò
s(   ‚C ª,CÁCÁ<CÂCÃCÃCc                 óJ  • / n[         R                  " U 5      nU(       a  UR                  UR                  5        U R                  nX0R                  :w  a#  UR                  USUR                  S5       5        UR                  U R                  5        SR                  U5      $ )z‹Get function full name.

Parameters
----------
func : callable
    The function object.

Returns
-------
name : str
    The function name.
NÚ.)ÚinspectÚ	getmodulerQ   r,   rc   ÚfindrR   )ÚfuncÚpartsÚmoduleÚqualnames       r2   Ú_get_func_namerä   ö  s|   € ð €EÜ×Ò˜tÓ$€FÞØ�‰�V—_‘_Ô%à× Ñ €HØ—=‘=Ó Ø�‰�XÐ2 §¡¨cÓ 2Ð3Ô4à	‡L�L�—‘ÔØ�8‰8�E‹?Ðr4   c           	      óÖ  ^• SSK Jn  / nTc  / OTm[        U 5      nUR                  S5      (       a  UR                  S5      (       a  U$ [        R
                  " U 5      (       a  U$ UR                  S5      S   S;   a  U$ UR                  S5      S	   S
:X  a  U$ [        [        U4S j[        U 5      5      5      n[        U5      S:”  a  US   S:X  a  UR                  S5        Ucr  / n[        R                  " SS9   [        R                  " S[        5         UR!                  U 5      nSSS5        [        U5      (       a  [)        SU< SUS   < 35      e/ n
US    HÐ  u  p¼nUR+                  5       (       d{  SU;   a7  USUR-                  S5       SS R+                  5       (       a  UUSU-  -   /-  nO>UR/                  5       R1                  S5      (       a  UUSUR3                  5       -  -   /-  nSU;  d  Mž  U
R%                  UR                  S5      S   R+                  S5      5        MÒ     [        U5      S:”  a  U$ [        [        U4S jU
5      5      n
/ n	[5        [7        [        U
5      [        U5      5      5       H%  nXn   X®   :w  d  M  U	SU< SXn   < S X®   < 3/-  n	  O   [        U5      [        U
5      :”  a  U	S!U[        U
5         -  /-  n	O-[        U5      [        U
5      :  a  U	S"U
[        U5         -  /-  n	[        U	5      S:X  a  / $ SSKnSSKnUR=                  U
5      R?                  5       nUR=                  U5      R?                  5       nU	S#/-  n	U	RA                  S$ URC                  UU5       5       5        URA                  U	5        SU-   /U-   nU$ ! [         am  nS[#        U5      ;   a9  [#        U5      R                  S5      SS n	USU 3/U	-   -  nUs SnAsSSS5        $ UR%                  [#        U5      5         SnAGNóSnAf[&         a)  nXES-   [#        U5      -   /-  nUs SnAsSSS5        $ SnAff = f! , (       d  f       GN3= f)%a>  Helper to check docstring.

Parameters
----------
func : callable
    The function object to test.
doc : str, default=None
    Docstring if it is passed manually to the test.
ignore : list, default=None
    Parameters to ignore.

Returns
-------
incorrect : list
    A list of string describing the incorrect results.
r   )Ú	docscrapeNzsklearn.zsklearn.externalsrÜ   éÿÿÿÿ)Úsetup_moduleÚteardown_moduleé   Úestimator_checksc                 ó   >• U T;  $ rj   rg   ©r’   rD   s    €r2   Ú<lambda>Ú,check_docstring_parameters.<locals>.<lambda>5  s	   ø€ ¨A°VªOr4   r@   T)ÚrecordÚerrorz"potentially wrong underline lengthÚ
é   zIn function: z parsing error: z
Error for z:
Ú
ParametersÚ:z9 There was no space between the param name and colon (%r)z6 Parameter %r has an empty type spec. Remove the colonÚ*z` c                 ó   >• U T;  $ rj   rg   rí   s    €r2   rî   rï   k  s	   ø€  q°¢r4   z\There's a parameter name mismatch in function docstring w.r.t. function signature, at index z diff: z != zbParameters in function docstring have less items w.r.t. function signature, first missing item: %sz`Parameters in function docstring have more items w.r.t. function signature, first extra item: %sz
Full diff:c              3   óB   #   • U  H  nUR                  5       v •  M     g 7frj   )Ústrip)rk   Úlines     r2   rm   Ú-check_docstring_parameters.<locals>.<genexpr>–  s   é € ð âRˆDð 	�
‰
�ˆÚRùs   ‚)"Únumpydocræ   rä   Ú
startswithrÝ   ÚisdatadescriptorÚsplitÚlistÚfilterrÚ   rÕ   Úremover8   rE   rF   ÚUserWarningÚFunctionDocrq   rQ   Ú	ExceptionrW   rù   ÚindexÚrstripÚendswithÚlstripÚrangeÚminÚdifflibÚpprintÚpformatÚ
splitlinesÚextendÚndiff)rà   ÚdocrD   ræ   Ú	incorrectÚ	func_nameÚparam_signatureÚrecordsÚexprs   Ú
param_docsrS   Útype_definitionÚ	param_docÚir  r  Úparam_docs_formattedÚparam_signature_formatteds     `                r2   Úcheck_docstring_parametersr    so  ø€ õ" #à€IØ‘>‰R v€Fä˜tÓ$€IØ×Ñ 
×+Ñ+¨y×/CÑ/CØ÷0ñ 0ð Ðä×Ò ×%Ñ%ØÐà‡��sÓ˜BÑÐ#FÓFØÐà‡��sÓ˜AÑÐ"4Ó4ØÐäœ6Ô";¼YÀt»_ÓMÓN€Oä
ˆ?Ó˜aÓ O°AÑ$6¸&Ó$@Ø×Ñ˜vÔ&ð �{ØˆÜ×$Ò$¨DÓ1Ü×!Ò! '¬;Ô7ð!Ø×+Ñ+¨DÓ1�÷ 2ô  ˆw�<‰<Ý³iÀÈÃÐLÓMÐMà€JØ,/°Ô,=Ñ(ˆ˜yà×$Ñ$×&Ñ&Ø�d‹{˜tÐ$5 d§j¡j°£oÐ6°r°sÐ;×AÑA×CÑCØØØQÐTXÑXñYðñ ‘	ð —‘“×'Ñ'¨×,Ñ,ØØØNØ—{‘{“}ñ&ñ&ðñ �	ð �d�?Ø×Ñ˜dŸj™j¨›o¨aÑ0×6Ñ6°tÓ<Ö=ñ% ->ô, ˆ9ƒ~˜ÓØÐô ”fÔ6¸
ÓCÓD€Jð €GÜ”3”s˜:“¬¨OÓ(<Ó=Ö>ˆØÑ ¡Õ.Ùó &'¨Ô(:¸J»MðKðñ ˆGñ
 ñ ?ô ˆ?Óœc *›oÓ-Øð:àœc *›oÑ.ñ/ð
ñ 	
‰ô 
ˆ_Ó	¤ J£Ó	/Øð8àœ˜_Ó-Ñ.ñ/ð
ñ 	
ˆô ˆ7ƒ|�qÓØˆ	ãÛà!Ÿ>™>¨*Ó5×@Ñ@ÓBÐØ &§¡¨Ó ?× JÑ JÓ LÐà�ˆ~Ñ€Gà‡N�Nñ à—M‘MÐ";Ð=QÔRóô ð
 ×Ñ�WÔð ! 9Ñ,Ð-°	Ñ9€IàÐøô ó )Ø7¼3¸s»8ÓCô " #›hŸn™n¨TÓ2°2°AÐ6�GØ M°)°Ð"=Ð!>ÀÑ!HÑH�IØ$Ô$÷ 2Ñ1ð —‘œs 3›x×(Ò(ûÜó !ØÐ*<Ñ<¼sÀ3»xÑGÐHÑH�	Ø Ô ÷ 2Ñ1ûð!ú÷ 2Ö1úsZ   Ã?QÄN.Î.
QÎ89P Ï1QÏ2QÐ P ÐQÐ QÐ-QÑQÑQÑQÑQÑ
Q(c                 óÒ  • [         R                  " SS9u  p4[        R                  " U5         [	        US5       nUR                  U R                  S5      5        SSS5        [        R                  U/n[        R                  " [        R                  " [        R                  " [        R                  5      S5      5      n[        R                  R!                  5       n [        R"                  R                  XxS   /5      US'   U[&        US.n	[        R                  R)                  S	5      n
U
(       a  X©S
   S	'   X)S'     [+        U40 U	D6nUR3                  S5      n[4        R6                  " X5      (       a"  US:X  a  SnOSU< 3nU SU< 3n[9        U5      e [        R<                  " U5        g! , (       d  f       GNb= f! [$         a    XxS'    NÑf = f! [,         a,  n[/        SUR0                  R3                  S5      -  5      eSnAff = f! [:         a,  n[/        SUR0                  R3                  S5      -  5      eSnAff = f! [        R<                  " U5        f = f)a'  Utility to check assertions in an independent Python subprocess.

The script provided in the source code should return 0 and the stdtout +
stderr should not match the pattern `pattern`.

This is a port from cloudpickle https://github.com/cloudpipe/cloudpickle

Parameters
----------
source_code : str
    The Python source code to execute.
pattern : str
    Pattern that the stdout + stderr should not match. By default, unless
    stdout + stderr are both empty, an error will be raised.
timeout : int, default=60
    Time in seconds before timeout.
z_src_test_sklearn.py)ÚsuffixÚwbzutf-8Nz..Ú
PYTHONPATH)ÚcwdÚstderrÚenvÚCOVERAGE_PROCESS_STARTr%  Útimeoutzscript errored with output:
%sú.+zExpected no outputz%The output was not supposed to match z$, got the following output instead: z!script timeout, output so far:
%s)rÁ   Úmkstempr    ÚcloseÚopenÚwriteÚencoder:   Ú
executablerÇ   ÚnormpathrR   ÚdirnameÚsklearnÚ__file__r¡   ÚcopyÚpathsepÚKeyErrorr   r¢   r   r	   rW   ÚoutputÚdecodeÚreÚsearchrp   r
   Úunlink)Úsource_codeÚpatternr'  ÚfdÚsource_fileÚfÚcmdr#  r%  rH   Úcoverage_rcÚoutrl   Úexpectationrs   s                  r2   r!   r!   £  s  € ô$ ×&Ò&Ð.DÑE�O€BÜ‡H‚HˆR„Lð'Ü�+˜tÔ$¨Ø�G‰G�K×&Ñ& wÓ/Ô0÷ %ä�~‰~˜{Ð+ˆÜ�kŠkœ"Ÿ'š'¤"§*¢*¬W×-=Ñ-=Ó">ÀÓEÓFˆÜ�j‰j�o‰oÓˆð	$Ü "§
¡
§¡°¸,Ñ6GÐ0HÓ IˆC�Ñð ¬°sÑ;ˆä—j‘j—n‘nÐ%=Ó>ˆÞØ6A�5‰MÐ2Ñ3à#ˆyÑð	ðÜ" 3Ñ1¨&Ñ1�ð —*‘*˜WÓ%ˆCÜ�yŠy˜×&Ñ&Ø˜d“?Ø"6‘Kà$IÈ'ÉÐ"U�Kà(˜MÐ)MÈcÉWÐU�Ü$ WÓ-Ð-ð 'ô 	�	Š	�+Õ÷M %Ö$ûô ó 	$Ø #�Óð	$ûô &ó Ü"Ø5¸¿¹¿¹ÈÓ8PÑPóð ûðûô ó 	ÜØ4°q·x±x·±ÀwÓ7OÑOóð ûð	ûô
 	�	Š	�+Õús„   ®I º!F6ÁBI Ã!&G Ä;I ÅG ÅAH Æ6
GÇ I ÇGÇI ÇGÇI Ç
HÇ&'HÈHÈH È
IÈ'IÉIÉI ÉI&c                 óÌ  • US:X  a0  Uc  [        U 5      $ [        R                  " XS9R                  5       $ US:X  a9  Uc  [	        U 5      $ [	        [        R                  " XS9R                  5       5      $ US:X  a  [        R                  " XS9$ US;   aI  [
        R                  " SUS9nUR                  XUS	S
9nUb  U H  nXx   R                  S5      Xx'   M     U$ US:X  aó  [
        R                  " SUS9n	[        R                  " U 5      n
Uc+  [        U
R                  S   5       Vs/ s H  nSU 3PM
     nn[        U5       VVs0 s H  u  p¼XÊSS2U4   _M     nnnU	R                  R                  U5      nUbT  [        UR                  5       H;  u  pèX…;   d  M  UR                  XèUR!                  U5      R#                  5       5      nM=     U$ US:X  al  [
        R                  " SUS9nUR                  XSS9nUbB  U H<  nUR%                  UR'                  U5      R)                  UR*                  5      5      nM>     U$ US:X  a$  [
        R                  " SUS9nUR-                  XS9$ US:X  a$  [
        R                  " SUS9nUR-                  U S9$ US:X  a$  [
        R                  " SUS9nUR/                  XS9$ US:X  a  [1        U S   U S   5      $ SU;   aô  [2        R4                  R7                  U 5      (       d  [        R8                  " U 5      n SU;   a'  [:        [=        S5      :  a  [?        U S[:         35      eUS;   a  [2        R4                  RA                  XS9$ US:X  a  [2        R4                  RC                  XS9$ US:X  a  [2        R4                  RE                  XS9$ US:X  a  [2        R4                  RG                  XS9$ ggs  snf s  snnf )aw  Convert a given container to a specific array-like with a dtype.

Parameters
----------
container : array-like
    The container to convert.
constructor_name : {"list", "tuple", "array", "sparse", "dataframe",             "series", "index", "slice", "sparse_csr", "sparse_csc",             "sparse_csr_array", "sparse_csc_array", "pyarrow", "polars",             "polars_series"}
    The type of the returned container.
columns_name : index or array-like, default=None
    For pandas container supporting `columns_names`, it will affect
    specific names.
dtype : dtype, default=None
    Force the dtype of the container. Does not apply to `"slice"`
    container.
minversion : str, default=None
    Minimum version for package to install.
categorical_feature_names : list of str, default=None
    List of column names to cast to categorical dtype.

Returns
-------
converted_container
r   N)r�   ro   Úarray)ÚpandasÚ	dataframerF  )Ú
minversionF)Úcolumnsr�   r3  r'   Úpyarrowé   ÚcolÚpolarsÚrow)ÚschemaÚorientÚseriesÚpolars_series)rÔ   r  Úslicer   r‹   z1.8z* is only available with scipy>=1.8.0, got )r‹   Ú
sparse_csrÚsparse_csr_arrayÚ
sparse_cscÚsparse_csc_array)$r   r   ÚasarrayÚtolistro   ÚpytestÚimportorskipÚ	DataFrameÚastyper
  ÚshapeÚ	enumerateÚTableÚfrom_pydictÚcolumn_namesÚ
set_columnÚcolumnÚdictionary_encodeÚwith_columnsrL  ÚcastÚCategoricalÚSeriesÚIndexrS  rŠ   r‹   rŒ   Ú
atleast_2dr   r   r-   Ú
csr_matrixÚ	csr_arrayÚ
csc_matrixÚ	csc_array)Ú	containerÚconstructor_nameÚcolumns_namer�   rH  Úcategorical_feature_namesÚpdrÍ   Úcol_nameÚparE  r  rS   r‘   Úcol_idxÚpls                   r2   Ú_convert_containerry  á  sÃ  € ðD ˜6Ó!Ø‰=Ü˜	“?Ð"ä—:’:˜iÑ5×<Ñ<Ó>Ð>Ø	˜WÓ	$Ø‰=Ü˜Ó#Ð#äœŸš IÑ;×BÑBÓDÓEÐEØ	˜WÓ	$Ü�zŠz˜)Ñ1Ð1Ø	Ð4Ó	4Ü× Ò  °jÑAˆØ—‘˜iÀUÐQV�ÐWˆØ$Ñ0Û5�Ø#)Ñ#3×#:Ñ#:¸:Ó#F�Ó ñ 6àˆØ	˜YÓ	&Ü× Ò  °zÑBˆÜ—
’
˜9Ó%ˆØÑÜ/4°U·[±[À±^Ô/DÓEÒ/D¨!˜c ! ›IÑ/DˆLÐEÜ1:¸<Ô1HÔIÒ1H¡g a�šA˜q˜D‘kÒ!Ñ1HˆÑIØ—‘×%Ñ% dÓ+ˆØ$Ñ0Ü%.¨v×/BÑ/BÖ%CÑ!�ØÕ8Ø#×.Ñ.Ø¨6¯=©=¸Ó+B×+TÑ+TÓ+Vó’Fñ &Dð
 ˆØ	˜XÓ	%Ü× Ò  °jÑAˆØ—‘˜iÀU�ÐKˆØ$Ñ0Û5�Ø×,Ñ,¨R¯V©V°HÓ-=×-BÑ-BÀ2Ç>Á>Ó-RÓS’ñ 6àˆØ	˜XÓ	%Ü× Ò  °jÑAˆØ�y‰y˜ˆyÐ0Ð0Ø	˜_Ó	,Ü× Ò  °jÑAˆØ�y‰y 	ˆyÐ*Ð*Ø	˜WÓ	$Ü× Ò  °jÑAˆØ�x‰x˜	ˆxÐ/Ð/Ø	˜WÓ	$Ü�Y˜q‘\ 9¨Q¡<Ó0Ð0Ø	Ð%Ó	%Ü�y‰y×!Ñ! )×,Ñ,ô
 Ÿš iÓ0ˆIàÐ&Ó&¬:¼ÀeÓ8LÓ+LÜØ#Ð$Ð$NÜ�,ð óð ð Ð7Ó7ä—9‘9×'Ñ'¨	Ð'Ð?Ð?ØÐ!3Ó3Ü—9‘9×&Ñ& yÐ&Ð>Ð>Ø Ó-Ü—9‘9×'Ñ'¨	Ð'Ð?Ð?ØÐ!3Ó3Ü—9‘9×&Ñ& yÐ&Ð>Ð>ð 4ð) 
&ùò9 FùÛIs   Ä-OÅO c                 ó   • [        XX#5      $ )aß  Context manager to ensure exceptions are raised within a code block.

This is similar to and inspired from pytest.raises, but supports a few
other cases.

This is only intended to be used in estimator_checks.py where we don't
want to use pytest. In the rest of the code base, just use pytest.raises
instead.

Parameters
----------
excepted_exc_type : Exception or list of Exception
    The exception that should be raised by the block. If a list, the block
    should raise one of the exceptions.
match : str or list of str, default=None
    A regex that the exception message should match. If a list, one of
    the entries must match. If None, match isn't enforced.
may_pass : bool, default=False
    If True, the block is allowed to not raise an exception. Useful in
    cases where some estimators may support a feature but others must
    fail with an appropriate error message. By default, the context
    manager will raise an exception if the block does not raise an
    exception.
err_msg : str, default=None
    If the context manager fails (e.g. the block fails to raise the
    proper exception, or fails to match), then an AssertionError is
    raised with this message. By default, an AssertionError is raised
    with a default error message (depends on the kind of failure). Use
    this to indicate how users should fix their estimators to pass the
    checks.

Attributes
----------
raised_and_matched : bool
    True if an exception was raised and a match was found, False otherwise.
)Ú_Raises)Úexpected_exc_typeÚmatchÚmay_passr}   s       r2   Úraisesr  N  s   € ôJ Ð$¨XÓ?Ð?r4   c                   ó    • \ rS rSrS rS rSrg)r{  iv  c                 ó¦   • [        U[        5      (       a  UOU/U l        [        U[        5      (       a  U/OUU l        X0l        X@l        SU l        g )NF)r(   r   Úexpected_exc_typesrq   Úmatchesr~  r}   Úraised_and_matched)r@   r|  r}  r~  r}   s        r2   r#   Ú_Raises.__init__x  sP   € ô Ð+¬X×6Ñ6ñ à#Ð$ð 	Ôô
 #-¨U´C×"8Ñ"8˜‘w¸eˆŒØ ŒØŒØ"'ˆÕr4   c                 ó2  ^^• Tc?  U R                   (       a  gU R                  =(       d    SU R                   3n[        U5      e[	        U4S jU R                   5       5      (       d$  U R                  b  [        U R                  5      TegU R
                  b~  U R                  =(       d4    SR                  SR                  U R
                  5      [        T5      5      n[	        U4S jU R
                   5       5      (       d  [        U5      TeSU l	        g)NTzDid not raise: c              3   ó<   >#   • U  H  n[        TU5      v •  M     g 7frj   )r*   )rk   Úexpected_typer¹   s     €r2   rm   Ú#_Raises.__exit__.<locals>.<genexpr>Ž  s"   øé € ð 
â!8�ô �x ×/Ð/Ú!8ùs   ƒFzIThe error message should contain one of the following patterns:
{}
Got {}rò   c              3   ód   >#   • U  H%  n[         R                  " U[        T5      5      v •  M'     g 7frj   )r8  r9  rq   )rk   r}  Ú	exc_values     €r2   rm   r‰  œ  s#   øé € ÐRÂ\¸E”r—y’y ¬¨I«×7Ð7Â\ùs   ƒ-0)
r~  r}   r‚  rp   Úanyrƒ  r.   rR   rq   r„  )r@   r¹   r‹  Ú_r}   s    ``  r2   r`   Ú_Raises.__exit__ƒ  sè   ù€ ð ÑØ�}�}ØàŸ,™,×U¨O¸D×<SÑ<SÐ;TÐ*U�Ü$ WÓ-Ð-äô 
à!%×!8Ò!8ó
÷ 
ñ 
ð �|‰|Ñ'Ü$ T§\¡\Ó2¸	ÐAàà�<‰<Ñ#Ø—l‘l÷ ð(ß(.©¨t¯y©y¸¿¹Ó/FÌÈIËÓ(Wð ô ÔRÀTÇ\Â\ÓR×RÑRÜ$ WÓ-°9Ð<Ø&*ˆDÔ#àr4   )r}   r‚  rƒ  r~  r„  N)r,   rb   rc   rd   r#   r`   rf   rg   r4   r2   r{  r{  v  s   † ò	(õr4   r{  c                   óN   • \ rS rSrSrSrSS jrSS jrS rS r	S	 r
S
 rS rSrg)ÚMinimalClassifieri£  züMinimal classifier implementation without inheriting from BaseEstimator.

This estimator should be tested with:

* `check_estimator` in `test_estimator_checks.py`;
* within a `Pipeline` in `test_pipeline.py`;
* within a `SearchCV` in `test_search.py`.
Ú
classifierNc                 ó   • Xl         g rj   ©rÙ   ©r@   rÙ   s     r2   r#   ÚMinimalClassifier.__init__¯  ó   € Ø�
r4   c                 ó   • SU R                   0$ ©NrÙ   r“  ©r@   Údeeps     r2   r—   ÚMinimalClassifier.get_params²  ó   € Ø˜Ÿ™Ð$Ð$r4   c                 óP   • UR                  5        H  u  p#[        XU5        M     U $ rj   ©rÐ   Úsetattr©r@   r×   rØ   Úvalues       r2   r˜   ÚMinimalClassifier.set_paramsµ  ó#   € Ø Ÿ,™,ž.‰JˆCÜ�D˜uÖ%ñ )àˆr4   c                 óš   • [        X5      u  p[        U5        [        R                  " USS9u  U l        nUR                  5       U l        U $ )NT)Úreturn_counts)r   r   r   ÚuniqueÚclasses_ÚargmaxÚ_most_frequent_class_idx)r@   ÚXr“   Úcountss       r2   ÚfitÚMinimalClassifier.fitº  s?   € Ü˜‹‰ˆÜ$ QÔ'Ü "§	¢	¨!¸4Ñ @ÑˆŒ�vØ(.¯©«ˆÔ%Øˆr4   c                 óè   • [        U 5        [        U5      nUR                  S   U R                  R                  4n[
        R                  " U[
        R                  S9nSUS S 2U R                  4'   U$ )Nr   )r^  r�   g      ð?)	r   r   r^  r§  Úsizer   ÚzerosÚfloat64r©  )r@   rª  Úproba_shapeÚy_probas       r2   Úpredict_probaÚMinimalClassifier.predict_probaÁ  s]   € Ü˜ÔÜ˜‹NˆØ—w‘w˜q‘z 4§=¡=×#5Ñ#5Ð6ˆÜ—(’( ´B·J±JÑ?ˆØ47ˆ’�4×0Ñ0Ð0Ñ1Øˆr4   c                 ó`   • U R                  U5      nUR                  SS9nU R                  U   $ )NrK  )Úaxis)r´  r¨  r§  )r@   rª  r³  Úy_preds       r2   ÚpredictÚMinimalClassifier.predictÉ  s1   € Ø×$Ñ$ QÓ'ˆØ—‘ Q�Ð'ˆØ�}‰}˜VÑ$Ð$r4   c                 ó<   • SSK Jn  U" X R                  U5      5      $ )Nr   )Úaccuracy_score)Úsklearn.metricsr¼  r¹  )r@   rª  r“   r¼  s       r2   ÚscoreÚMinimalClassifier.scoreÎ  s   € Ý2á˜a§¡¨a£Ó1Ð1r4   )r©  r§  rÙ   rj   ©T)r,   rb   rc   rd   re   Ú_estimator_typer#   r—   r˜   r¬  r´  r¹  r¾  rf   rg   r4   r2   r�  r�  £  s1   † ñð #€Oôô%òò
òò%õ
2r4   r�  c                   óH   • \ rS rSrSrSrSS jrSS jrS rS r	S	 r
S
 rSrg)ÚMinimalRegressoriÔ  zûMinimal regressor implementation without inheriting from BaseEstimator.

This estimator should be tested with:

* `check_estimator` in `test_estimator_checks.py`;
* within a `Pipeline` in `test_pipeline.py`;
* within a `SearchCV` in `test_search.py`.
Ú	regressorNc                 ó   • Xl         g rj   r“  r”  s     r2   r#   ÚMinimalRegressor.__init__à  r–  r4   c                 ó   • SU R                   0$ r˜  r“  r™  s     r2   r—   ÚMinimalRegressor.get_paramsã  rœ  r4   c                 óP   • UR                  5        H  u  p#[        XU5        M     U $ rj   rž  r   s       r2   r˜   ÚMinimalRegressor.set_paramsæ  r£  r4   c                 ód   • [        X5      u  pSU l        [        R                  " U5      U l        U $ ©NT)r   Ú
is_fitted_r   ÚmeanÚ_mean©r@   rª  r“   s      r2   r¬  ÚMinimalRegressor.fitë  s(   € Ü˜‹‰ˆØˆŒÜ—W’W˜Q“ZˆŒ
Øˆr4   c                 óŒ   • [        U 5        [        U5      n[        R                  " UR                  S   4S9U R
                  -  $ )Nr   )r^  )r   r   r   Úonesr^  rÏ  )r@   rª  s     r2   r¹  ÚMinimalRegressor.predictñ  s5   € Ü˜ÔÜ˜‹NˆÜ�wŠw˜aŸg™g a™j˜]Ñ+¨d¯j©jÑ8Ð8r4   c                 ó<   • SSK Jn  U" X R                  U5      5      $ )Nr   )Úr2_score)r½  rÖ  r¹  )r@   rª  r“   rÖ  s       r2   r¾  ÚMinimalRegressor.scoreö  s   € Ý,á˜Ÿ<™<¨›?Ó+Ð+r4   )rÏ  rÍ  rÙ   rj   rÀ  )r,   rb   rc   rd   re   rÁ  r#   r—   r˜   r¬  r¹  r¾  rf   rg   r4   r2   rÃ  rÃ  Ô  s,   † ñð "€Oôô%òò
ò9õ
,r4   rÃ  c                   óP   • \ rS rSrSrSS jrSS jrS rSS jrSS jr	SS	 jr
S
rg)ÚMinimalTransformeriü  zýMinimal transformer implementation without inheriting from
BaseEstimator.

This estimator should be tested with:

* `check_estimator` in `test_estimator_checks.py`;
* within a `Pipeline` in `test_pipeline.py`;
* within a `SearchCV` in `test_search.py`.
Nc                 ó   • Xl         g rj   r“  r”  s     r2   r#   ÚMinimalTransformer.__init__  r–  r4   c                 ó   • SU R                   0$ r˜  r“  r™  s     r2   r—   ÚMinimalTransformer.get_params
  rœ  r4   c                 óP   • UR                  5        H  u  p#[        XU5        M     U $ rj   rž  r   s       r2   r˜   ÚMinimalTransformer.set_params  r£  r4   c                 ó*   • [        U5        SU l        U $ rÌ  )r   rÍ  rÐ  s      r2   r¬  ÚMinimalTransformer.fit  s   € Ü�AŒØˆŒØˆr4   c                 ó2   • [        U 5        [        U5      nU$ rj   )r   r   rÐ  s      r2   Ú	transformÚMinimalTransformer.transform  s   € Ü˜ÔÜ˜‹NˆØˆr4   c                 óB   • U R                  X5      R                  X5      $ rj   )r¬  rã  rÐ  s      r2   Úfit_transformÚ MinimalTransformer.fit_transform  s   € Ø�x‰x˜‹~×'Ñ'¨Ó-Ð-r4   )rÍ  rÙ   rj   rÀ  )r,   rb   rc   rd   re   r#   r—   r˜   r¬  rã  ræ  rf   rg   r4   r2   rÙ  rÙ  ü  s%   † ñôô%òô
ô
÷
.r4   rÙ  c                 ó²  •  [         R                  " U 5      n SS KnUR                  UR                  S5      5      nU S:X  a:  US:X  a4  UR                  R                  R                  5       (       d  [        S5      eU S:X  ab  US:X  a\  [        R                  " S	5      S
:w  a  [        S5      eUR                  R                  R                  5       (       d  [        S5      e U$ U S;   a7  SS KnUR                  R                  R!                  5       S:X  a  [        S5      eU$ ! [         a    [        U  S35      ef = f! [
         a    [        S5      ef = f)Nz/ is not installed: not checking array_api inputr   z?array_api_compat is not installed: not checking array_api inputrK  ÚtorchÚcudaz2PyTorch test requires cuda, which is not availableÚmpsÚPYTORCH_ENABLE_MPS_FALLBACKÚ1zHSkipping MPS device test because PYTORCH_ENABLE_MPS_FALLBACK is not set.zXMPS is not available because the current PyTorch install was not built with MPS enabled.>   Úcupyúcupy.array_apiz/CuPy test requires cuda, which is not available)Ú	importlibÚimport_moduleÚModuleNotFoundErrorr"   Úarray_api_compatÚImportErrorÚget_namespacerX  Úbackendsrê  Úis_builtr    Úgetenvrë  rî  ÚruntimeÚgetDeviceCount)Úarray_namespaceÚdeviceÚ	array_modró  Úxprî  s         r2   Ú_array_api_for_testsrÿ     sa  € ð
Ü×+Ò+¨OÓ<ˆ	ð

Ûð 
×	'Ñ	'¨	×(9Ñ(9¸!Ó(<Ó	=€Bà˜7Ó"Ø�fÓØ—‘× Ñ ×)Ñ)×+Ñ+äÐKÓLÐLØ	˜GÓ	#¨°%«Ü�9Š9Ð2Ó3°sÓ:ô ðóð ð �{‰{�‰×'Ñ'×)Ñ)Üð*óð ð *ð €Ið 
Ð6Ó	6Ûà�9‰9×Ñ×+Ñ+Ó-°Ó2ÜÐLÓMÐMØ€IøôQ ó 
ÜØÐÐNÐOó
ð 	
ð
ûô ó 
ÜØMó
ð 	
ð
ús   ‚D$ ™E  Ä$D=Å Ec                  ó.  • [          " S S5      5       n U " S[        S9U " S[        S9U " S[        S9U " SS[        S9U " SS[        S9U " SS	[        S9U " SS
[        S9U " SS[        S9U " SS[        S9U " SS[        S9U " SS[        S9U " SS[        S9/$ )Nc                   óH   • \ rS rSr% S\S'   Sr\\S'   \r\	\   \S'   S r
Srg	)
Ú4_get_warnings_filters_info_list.<locals>.WarningInfoiO  zwarnings._ActionKindÚactionÚ rs   r'   c                 óþ   • U R                   R                  S:X  a  U R                   R                  nO/U R                   R                   SU R                   R                   3nU R                   SU R                   SU 3$ )NÚbuiltinsrÜ   rõ   )r'   rb   r,   r  rs   r?   s     r2   Úto_filterwarning_strÚI_get_warnings_filters_info_list.<locals>.WarningInfo.to_filterwarning_strU  sh   € Ø�}‰}×'Ñ'¨:Ó5ØŸ=™=×1Ñ1‘à"Ÿm™m×6Ñ6Ð7°q¸¿¹×9OÑ9OÐ8PÐQ�à—k‘k�] ! D§L¡L >°°8°*Ð=Ð=r4   rg   N)r,   rb   rc   rd   Ú__annotations__rs   rq   r+   r'   r)   r  rf   rg   r4   r2   ÚWarningInfor  O  s%   ‡ à&Ó&Øˆ�ÓØ")ˆ�$�w‘-Ó)õ	>r4   r
  rñ   r&   rD   z%pkg_resources is deprecated as an API©rs   r'   z!Deprecated call to `pkg_resourceszQThe --rsyncdir command line argument and rsyncdirs config variable are deprecatedz,\s*Pyarrow will become a required dependencyz"datetime.datetime.utcfromtimestampzast.Num is deprecatedzAttribute n is deprecatedzast.Str is deprecatedzAttribute s is deprecated)r   ÚDeprecationWarningÚFutureWarningr   )r
  s    r2   Ú_get_warnings_filters_info_listr  N  sõ   € Ü÷>ð >ó ð>ñ 	�GÔ&8Ñ9Ù�G¤mÑ4Ù�GÔ&?Ñ@ñ 	ØØ;Ü'ñ	
ñ
 	ØØ7Ü'ñ	
ñ 	Øðô (ñ	
ñ 	ØØCÜ'ñ	
ñ 	ØØ8Ü'ñ	
ñ 	ØÐ5Ô@Rñ	
ñ 	ØÐ9ÔDVñ	
ñ 	ØÐ5Ô@Rñ	
ñ 	ØÐ9ÔDVñ	
ðq;ð ;r4   c                  ób   • [        5       n U  Vs/ s H  nUR                  5       PM     sn$ s  snf rj   )r  r  )Úwarning_filters_info_listÚwarning_infos     r2   Úget_pytest_filterwarning_linesr  ›  s;   € Ü ?Ó AÐñ 6óâ5ˆLð 	×)Ñ)Ö+Ù5ñð ùò s   �,c                  ó’   • [        5       n U  H7  n[        R                  " UR                  UR                  UR
                  S9  M9     g )Nr  )r  r8   Úfilterwarningsr  rs   r'   )Úwarnings_filters_info_listr  s     r2   Úturn_warnings_into_errorsr  £  s>   € Ü!@Ó!BÐÛ2ˆÜ×ÒØ×ÑØ ×(Ñ(Ø!×*Ñ*ô	
ò 3r4   )Ng        Tr  T)ry   g•Ö&è.>r  )r   )F)r½   F)NN)r(  é<   )NNNN)NFN)mre   rÃ   Ú
contextlibrÅ   rð  rÝ   r    Úos.pathr¥   rÇ   r8  r§   r:   rÁ   Úunittestr8   Úcollections.abcr   Údataclassesr   r   r   Ú
subprocessr   r	   r
   r   r   rÈ   Únumpyr   ÚscipyrŠ   Únumpy.testingr   r„   r   r   r   r   r   r   r1  Úsklearn.utils._array_apir   Úsklearn.utils.fixesr   r   r   r   r   r   Úsklearn.utils.multiclassr   Úsklearn.utils.validationr   r   r   Ú__all__Ú_dummyÚassertRaisesr   Úcaser"   ÚassertDictEqualÚassert_dict_equalÚassertRaisesRegexÚassert_raises_regexr    r+   r3   r0   rw   r”   rš   ÚARRAY_API_COMPAT_FUNCTIONALrô  rZ  ÚmarkÚskipifÚskip_if_32bitÚxfailÚfails_if_pypyÚfails_if_unstable_openblasÚparallelÚmpÚskip_if_no_parallelÚ'skip_if_array_api_compat_not_configuredÚplatformÚ!if_safe_multiprocessing_with_blasr£   r¬   r®   r´   rÚ   rä   r  r!   ry  r  ÚAbstractContextManagerr{  r�  rÃ  rÙ  rÿ  r  r  r  rg   r4   r2   Ú<module>r;     sº  ðÙ ó Û Û Û Û Û 	Ý Û 	Û Û 
Û Û Û Ý $Ý !Ý Ý ß OÓ OÝ ã Û Û Ý ?÷÷ ó Ý >÷÷ õ B÷ñ ò€ñ 
�*Ó	€Ø×#Ñ#€Ø�=‰=×!Ñ!€Ø×*Ñ*Ð à×.Ñ.Ð ð +Ð ð  wô )2÷X6ñ 6òr'QðV OSôFôR'
ôT8ð (Ù˜dÔ#Ø"&Ðð(	Ûà—K‘K×&Ñ& yÐ9UÐ&ÐV€MØ—K‘K×%Ñ% hÐ7QÐ%ÐR€MØ!'§¡×!2Ñ!2Ù+Ó-Ø<ð "3ð "Ðð !Ÿ+™+×,Ñ,Ø�O‰O×ÑÔÐ'Að -ð Ðð /5¯k©k×.@Ñ.@Ø'Ô'ØVð /Að /Ð+ð0 )/¯©×(:Ñ(:Ø�‰˜Ñ Ð)Tð );ð )Ð%òHô
P÷)ñ )ô,ô,ò4ô4Pôf;ðB Ø
ØØ"ôj?ôZ%@ôP*ˆj×/Ñ/ô *÷Z.2ñ .2÷b%,ñ %,÷P!.ñ !.òH+ò\JòZó
øðk ó (Ø"'Óð(ûðT ó 	Ùð	ús%   Ä
I. Ä'CI= É.I:É9I:É=JÊJ