
    Mpj_                        S SK JrJr  S SKrS SKrS SKJrJr  S SK	J
r
Jr  S SKJrJr  S SKJr  S SKJr  S SKJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+  S S	K,J-r-  \+" \/\/\/\/S
.SS9S{S S.S jj5       r. " S S5      r/ " S S\5      r0\Rb                  Re                  S\\/5      S 5       r3\Rb                  Re                  S\\/5      S 5       r4S r5\Rb                  Re                  S\" \S SSS9\" \SSSS9/5      S 5       r6\Rb                  Re                  S\SSSS .\7S!4\SS"S#S .\7S$4\SS SS .\8S%4\S SS&S .\8S'4\SS(SS .\8S)4/5      S* 5       r9S+ r:S, r;\Rb                  Re                  S-\<S.4\S.4\S/4\Rz                  S04/5      S1 5       r>S2 r?\Rb                  Re                  S3\" \SS SS9\" \S SSS9\" \SSS#S9\" 1 S4k5      \" 5       \" SS59\'" 5       \" S65      \!" 5       \" 5       /
5      S7 5       r@\Rb                  Re                  S8\" \SS9S&S9\" \S:S;SS94\" \SS9S&S9\" \S:S;S#S94\" \SS9S&S9\" \S<S;SS94\" \SS9S&S9\" \S;SSS94\" \SS9S&S9\" \S<SS#S94\" \S9SSS9\" \S:S;SS94\" \S9SSS9\" \S:S;S#S94\" \S9SSS9\" \SSSS94\" \S9SSS9\" \SS:SS94\" \S9SSS9\" \SS=S#S94\" \S:S;SS9\" \SSS&S94\" \S:S;SS9\" \SSSS94\" \S:S;SS9\" \S>S=S#S94\" \S:S;SS9\" \S>S=S&S94\" \S:S;S#S9\" \S?S@S#S94\" \S:S;S#S9\" \S?S@SS94\" \SSSS9\" \S SSS94\" \SSSS9\" \S SSS94/5      SA 5       rA\Rb                  Re                  S3\" 5       \ " \B5      \" 5       \#" 5       \%" 5       \&" 5       \" 5       \" \SSS#S9/5      SB 5       rC\Rb                  Re                  S3\" 5       \" 5       \ " \B5      \#" 5       \%" 5       \&" 5       \" 5       \'" 5       \" 5       \" SS59\" 1 S4k5      \" \1 SCk5      \" \SSS#S9\" \S S@S#S9\" \S SS#S9\" \SS S#S9\" \S SS#S9\" \S SSS9\" \SS S&S9\" S65      \!" 5       \" 5       /5      SD 5       rD\Rb                  Re                  SE\" \S SSS9SF4\" \S SS#S9SG4\" 1 S4k5      SH4\" \E\R                  \R                  15      \R                  4\HSI 4SJSKSS/S9S<//4SK\R                  " SS/S9S<//5      4SL\" SS/S9S<//5      4SL\" SS/S9S<//5      4/
\- V s/ s H  n SLU " SS/S9S<//5      4PM     sn QSMPSN\R                  R                  S 5      4PSOP\/\/" 5       4P\<S4P\SP4PSQPSRPSS\R                  4P\" 5       S(4P\" 5       ST4P\" 5       SSU-  4P\" 5       S4P\" 5       \M" SS5      4P\" 5       \R                  4P\" 5       SV4P\" S65      \0" S SW94PSXP5      SY 5       rN\Rb                  Re                  SZ\" \S SSS9\4\" S[S\15      \4\" \SFS]15      \4SK\4SL\&4SN\%4S\#4\H\4\<\ 4S^\4S_\'4\" SS59\4\" S65      \4S`\4SS\"4\R                  \"4/5      Sa 5       rOSb rPSc rQSd rRSe rSSf rTSg rUSh rVSi rWSj rXSk rYSl rZSm r[Sn r\So r]Sp r^Sq r_Sr r`Ss raSt rb\Rb                  Re                  SuSSv/5      Sw 5       rc\Rb                  Re                  Sx/ SyQ5      Sz 5       rdgs  sn f )|    )IntegralRealN)	csr_array
csr_matrix)config_context
get_config)BaseEstimator_fit_context)LeaveOneOut
deprecated)
HasMethodsHiddenIntervalInvalidParameterErrorMissingValuesOptions
RealNotInt
StrOptions_ArrayLikes	_Booleans
_Callables
_CVObjects_InstancesOf_IterablesNotString_NanConstraint_NoneConstraint_PandasNAConstraint_RandomStates_SparseMatrices_VerboseHelpergenerate_invalid_param_valgenerate_valid_parammake_constraintvalidate_params)CSR_CONTAINERS)abcdTprefer_skip_nested_validation)r*   c                    g)z/A function to test the validation of functions.N )r'   r(   r)   r*   argskwargss         e/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/sklearn/utils/tests/test_param_validation.py_funcr2   )           c                   l    \ rS rSrSr\" S\/0SS9S 5       r\" 5       \" S\/0SS9S 5       5       r	Sr
g	)
_Class1   zJA class to test the _InstancesOf constraint and the validation of methods.r'   Tr+   c                     g)zA validated methodNr.   selfr'   s     r1   _method_Class._method4   r3   r4   c                     g)zA deprecated validated methodNr.   r9   s     r1   _deprecated_method_Class._deprecated_method8   r3   r4   r.   N)__name__
__module____qualname____firstlineno____doc__r%   r   r;   r   r>   __static_attributes__r.   r4   r1   r6   r6   1   sQ    TcD6]$G! H! \cD6]$G, H ,r4   r6   c                   P    \ rS rSr% SrS\/0r\\S'   S r	\
" SS9SS	 j5       rS
rg)
_Estimator>   z<An estimator to test the validation of estimator parameters.r'   _parameter_constraintsc                     Xl         g Nr'   r9   s     r1   __init___Estimator.__init__C   s    r4   Tr+   Nc                     g rK   r.   )r:   Xys      r1   fit_Estimator.fitF       r4   rL   NN)r@   rA   rB   rC   rD   r   rI   dict__annotations__rM   r
   rR   rE   r.   r4   r1   rG   rG   >   s4    F$'$=D0 5 6r4   rG   interval_typec                     [        U SSSS9nSU;   d   eSU;  d   e[        U SSSS9nSU;  d   eSU;   d   e[        U SSSS9nSU;   d   eSU;   d   e[        U SSSS9nSU;  d   eSU;  d   eg)	z.Check the range of values depending on closed.   leftclosedrightbothneitherN)r   rX   intervals     r1   test_interval_rangerd   K   s     r1V<H>>Hr1W=HX==r1V<H>>==r1Y?HXHr4   c                 H   [        U SSSS9nSS-  U;  d   eSS-  U;  d   e[        SS-  5      U;  d   e[        SS-  5      U;  d   e[        U SSS-  SS9nSS-  U;   d   eSS-  U;  d   e[        SS-  5      U;   d   e[        SS-  5      U;  d   eSS-  U;  d   eg)	zZCheck that Interval constraint work with large integers.

non-regression test for #26648.
r   r[   ra   r]   A      i   N)r   floatrb   s     r1   test_interval_large_integersri   _   s     q!I>Hb5   c6!!!B<x'''C=(((q!S&CHb5Hc6!!!B<8###C=(((d7("""r4   c                     [        [        SSSS9n [        R                  U ;   d   e[        [        SSSS9n [        R                  * U ;   d   e[        [        SSSS9n [        R                  U ;  d   e[        R                  * U ;  d   eg)zbCheck that inf is included iff a bound is closed and set to None.

Only valid for real intervals.
r   Nr_   r]   r\   ra   )r   r   npinfrc   s    r1   test_interval_inf_in_boundsrn   t   s    
 ag6H66XdAf5HFF7hdD;H66!!!FF7("""r4   rc      r\   r]   r`   c                 0    [         R                  U ;  d   eg)z)Check that np.nan is not in any interval.N)rk   nanrm   s    r1   test_nan_not_in_intervalrr      s     66!!!r4   zparams, error, match      ?r[   )typer\   r_   r^   z=Expecting left to be an int for an interval over the integersg       @ra   z>Expecting right to be an int for an interval over the integersz&left can't be None when closed == leftr_   z(right can't be None when closed == rightzright can't be less than leftc                 v    [         R                  " XS9   [        S0 U D6  SSS5        g! , (       d  f       g= f)zNCheck that informative errors are raised for invalid combination of parametersmatchNr.   )pytestraisesr   )paramserrorrx   s      r1   test_interval_errorsr}      s(    @ 
u	*6 
+	*	*s   *
8c                      [        1 SkS1S9n U R                  S5      (       d   eU R                  S5      (       d   eU R                  S5      (       a   eS[        U 5      ;   d   eg)z*Sanity check for the StrOptions constraint   r'   r(   r)   r)   r   r'   r*   z'c' (deprecated)N)r   is_satisfied_bystroptionss    r1   test_stroptionsr      sg    cU;G""3''''""3''''&&s++++W---r4   c                     [        [        SS[        R                  1S1S9n U R	                  S5      (       d   eU R	                  [        R                  5      (       d   eU R	                  S5      (       a   eS[        U 5      ;   d   eg)z'Sanity check for the Options constraintg            ?r   Gz?z-0.5 (deprecated)N)r   r   rk   rl   r   r   r   s    r1   test_optionsr      sx    dT3/TFCG""4((((""266****&&t,,,,#g,...r4   ztype, expected_type_nameintrh   znumpy.ndarrayc                 D    [        U 5      n[        U5      SU S3:X  d   eg)z?Check the string representation of the _InstancesOf constraint.zan instance of ''N)r   r   )rt   expected_type_name
constraints      r1   %test_instances_of_type_human_readabler      s,     d#Jz? 01C0DAFFFFr4   c                      [        SS/5      n  " S S5      n " S S5      nU R                  U" 5       5      (       d   eU R                  U" 5       5      (       a   e[        U 5      S:X  d   eg)	z Check the HasMethods constraint.r'   r(   c                        \ rS rSrS rS rSrg)test_hasmethods.<locals>._Good   c                     g rK   r.   r:   s    r1   r'    test_hasmethods.<locals>._Good.a       r4   c                     g rK   r.   r   s    r1   r(    test_hasmethods.<locals>._Good.b   r   r4   r.   N)r@   rA   rB   rC   r'   r(   rE   r.   r4   r1   _Goodr      s    		r4   r   c                       \ rS rSrS rSrg)test_hasmethods.<locals>._Bad   c                     g rK   r.   r   s    r1   r'   test_hasmethods.<locals>._Bad.a   r   r4   r.   N)r@   rA   rB   rC   r'   rE   r.   r4   r1   _Badr      s    	r4   r   z"an object implementing 'a' and 'b'N)r   r   r   )r   r   r   s      r1   test_hasmethodsr      sk    S#J'J   %%eg....))$&1111z?BBBBr4   r   r   )numeric_onlyrR   c                 J    [        U 5      nU R                  U5      (       a   eg)z>Check that the value generated does not satisfy the constraintNr"   r   )r   	bad_values     r1   test_generate_invalid_param_valr      s(    " +:6I)))44444r4   zinteger_interval, real_interval         i   
   c                     [        US9nUR                  U5      (       a   eU R                  U5      (       a   e[        U S9nUR                  U5      (       a   eU R                  U5      (       a   eg)zlCheck that the value generated for an interval constraint does not satisfy any of
the interval constraints.
r   Nr   )integer_intervalreal_intervalr   s      r1   +test_generate_invalid_param_val_2_intervalsr      sy    b +mDI,,Y7777//	::::*6FGI,,Y7777//	:::::r4   c                     [         R                  " [        5         [        U 5        SSS5        g! , (       d  f       g= f)zeCheck that the function raises NotImplementedError when there's no invalid value
for the constraint.
N)ry   rz   NotImplementedErrorr"   r   s    r1   )test_generate_invalid_param_val_all_validr   W  s%    " 
*	+":. 
,	+	+s   0
>>   ro   r[   r   c                 J    [        U 5      nU R                  U5      (       d   eg)z;Check that the value generated does satisfy the constraint.N)r#   r   )r   values     r1   test_generate_valid_paramr   l  s%    : !,E%%e,,,,r4   zconstraint_declaration, valuegzG?*   r(   c                     U S-   $ )Nro   r.   )xs    r1   <lambda>r     s    QUr4   rU   z
array-likezsparse matrix)random_stater   r   )r   Nr   )booleanF)verbosero   rq   g      i  missingrL   )	cv_objectr   c                 J    [        U 5      nUR                  U5      (       d   eg)z+Sanity check for the is_satisfied_by methodN)r$   r   )constraint_declarationr   r   s      r1   test_is_satisfied_byr     s'    N !!78J%%e,,,,r4   z1constraint_declaration, expected_constraint_classoption1option2r   r   r   r   c                 <    [        U 5      nUR                  UL d   eg)zICheck that make_constraint dispatches to the appropriate constraint classN)r$   	__class__)r   expected_constraint_classr   s      r1   test_make_constraintr     s$    . !!78J#<<<<r4   c                      [         R                  " [        SS9   [        S5        SSS5        g! , (       d  f       g= f)zNCheck that an informative error is raised when an unknown constraint is passedzUnknown constraintrw   znot a valid constraintN)ry   rz   
ValueErrorr$   r.   r4   r1   test_make_constraint_unknownr     s&    	z)=	>01 
?	>	>s   /
=c                     [         R                  " [        SS9   [        SSS9  SSS5        [         R                  " [        SS9   [        SS/SS06  SSS5        [         R                  " [        S	S9   [        S0 SS0D6  SSS5        [         R                  " [        S
S9   [        SSSS9  SSS5        [         R                  " [        SS9   [        S// SQQ7SS0SS0D6  SSS5        [         R                  " [        S	S9   [        S// SQQ7SS0SS0D6  SSS5        g! , (       d  f       GN	= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       g= f)zGCheck that validate_params works no matter how the arguments are passedz"The 'a' parameter of _func must berw   wrongro   r)   Nz"The 'b' parameter of _func must ber)   "The 'c' parameter of _func must bez"The 'd' parameter of _func must be)r)   r*   r   )r   r[   r   r   er   ro   r[   r   four)ro   )ry   rz   r   r2   r.   r4   r1   test_validate_paramsr     sU   	%I
 	g

 
%I
 	7|!q!

 
%I
 	"C>"

 
%I
 	a1 
 
%I
 	a3/3Q33(3

 
%I
 	a2)2v2#q2
 
5
 


 


 


 

 


 
sG   D'D95E
$EE,E='
D69
E

E
E),
E:=
Fc                  D    [        S[        /0SS9S 5       n U " SS5        g)zLCheck that no error is raised when there are parameters without
constraints
r'   Tr+   c                     g rK   r.   )r'   r(   s     r1   func1test_validate_params_missing_params.<locals>.func   rT   r4   ro   r[   N)r%   r   )r   s    r1   #test_validate_params_missing_paramsr     s/    
 cC5\F G 	AJr4   c                  ~   [        5       " [        5      n [        R                  " [        SS9   U " SSSS9  SSS5        [        R                  " [        SS9   [        R
                  " [        SS9   U " SSS	S9  SSS5        SSS5        g! , (       d  f       N[= f! , (       d  f       N(= f! , (       d  f       g= f)
z5Check that validate_params functions can be decoratedzFunction _func is deprecatedrw   ro   r[   r   r   Nr   r   )r   r2   ry   warnsFutureWarningrz   r   )decorated_functions    r1    test_decorate_validated_functionr     s    #e,	m+I	J1a1% 
K 
m+I	J]]!)N
 q!w/
 
K	J	 
K	J

 
 
K	Js/   	BB.2	B;B.
B
B+	'B..
B<c                     [         R                  " [        SS9   [        5       R	                  S5        SSS5        [         R
                  " [        SS9   [         R                  " [        SS9   [        5       R                  S5        SSS5        SSS5        g! , (       d  f       Nl= f! , (       d  f       N(= f! , (       d  f       g= f)z-Check that validate_params works with methodsz+The 'a' parameter of _Class._method must berw   r   Nz)Function _deprecated_method is deprecatedz6The 'a' parameter of _Class._deprecated_method must be)ry   rz   r   r6   r;   r   r   r>   r.   r4   r1   test_validate_params_methodr     s    	%R
 	!
 
m+V	W]]!J
 H''0	
 
X	W
 

 
 
X	Ws/   BB</B+	B<
B(+
B9	5B<<
C
c                      [        S5      n [        R                  " [        SS9   U R	                  5         SSS5        g! , (       d  f       g= f)z9Check that validate_params works with Estimator instancesr   z'The 'a' parameter of _Estimator must berw   N)rG   ry   rz   r   rR   )ests    r1   test_validate_params_estimatorr   &  s;     W
C	%N
 		
 
 
s	   ?
Ac                      [         R                  " [        SS9   [        1 SkSS1S9  SSS5        g! , (       d  f       g= f)z@Check that the deprecated parameter must be a subset of options.z#deprecated options must be a subsetrw   r   r'   r*   r   N)ry   rz   r   r   r.   r4   r1   !test_stroptions_deprecated_subsetr   1  s,    	z)N	O?Sz: 
P	O	Os	   2
A c                  6   [        S[        [        5      [        /0SS9S 5       n U " SSSS.5        U " / S	Q5        [        R
                  " [        S
S9 nU " SS9  SSS5        [        WR                  5      nSU;   d   eSU;  d   eg! , (       d  f       N4= f)zECheck that internal constraints are not exposed in the error message.paramTr+   c                     g rK   r.   r   s    r1   f!test_hidden_constraint.<locals>.f:  s     	r4   ro   r[   r   )r'   r(   r)   r   The 'param' parameterrw   badr   Nzan instance of 'dict'zan instance of 'list')	r%   r   listrV   ry   rz   r   r   r   r   exc_infoerr_msgs      r1   test_hidden_constraintr   7  s     	6$<&'t AAAiL	%<
		
 (..!G"g---"'111
 
s   B


Bc            	      B   [        S[        S15      [        [        S15      5      /0SS9S 5       n U " S5        U " S5        [        R                  " [
        SS9 nU " S	S
9  SSS5        [        WR                  5      nSU;   d   eSU;  d   eg! , (       d  f       N4= f)zBCheck that we can have 2 StrOptions constraints, one being hidden.r   autowarnTr+   c                     g rK   r.   r   s    r1   r   !test_hidden_stroptions.<locals>.fR      
 	r4   r   rw   r   r   N)r%   r   r   ry   rz   r   r   r   r   s      r1   test_hidden_stroptionsr   O  s     	:vh'
F80D)EFG&*	 fIfI	%<
		
 (..!GW   
 
s   B
Bc                  |    [        [        S5      (       d   e[        [        5       R                  S5      (       d   eg)zCheck that the validate_params decorator properly sets the parameter constraints
as attribute of the decorated function/method.
_skl_parameter_constraintsN)hasattrr2   r6   r;   r.   r4   r1   4test_validate_params_set_param_constraints_attributer   h  s4     56777768##%ABBBBr4   c                  r    [        SS/0SS9S 5       n U " S5        U " [        R                  " S5      5        g)zCheck that validate_params raise a deprecation message but still passes
validation when using an int for a parameter accepting a boolean.
r   r   Tr+   c                     g rK   r.   r   s    r1   r   1test_boolean_constraint_deprecated_int.<locals>.fu  rT   r4   FN)r%   rk   bool_r   s    r1   &test_boolean_constraint_deprecated_intr  p  s>    
 g	{+4P Q dGbhhuor4   c                      [        [        S/SS.SS9SS j5       n [        R                  " [        SS9   U " S	S
9  SSS5         " S S5      nU " US9  U " U" 5       S9  g! , (       d  f       N*= f)z5Check that validation can be skipped for a parameter.Nno_validationparam1param2Tr+   c                     g rK   r.   r  s     r1   r   test_no_validation.<locals>.f  r   r4   zThe 'param1' parameterrw   r   )r  c                       \ rS rSrSrg)$test_no_validation.<locals>.SomeTypei  r.   N)r@   rA   rB   rC   rE   r.   r4   r1   SomeTyper    s    r4   r  )r  rU   r%   r   ry   rz   r   )r   r  s     r1   test_no_validationr  ~  sr     ;/:&*	 
,4L	M	 
N  XXZ 
N	Ms   A  
A.c                      [         R                  " S5      n [        5       nUR                  U R                  5      (       d   eUR                  [
        R                  " / SQ5      5      (       a   eg)z9Add a specific test for checking support for `pandas.NA`.pandasr   N)ry   importorskipr   r   NArk   array)pdna_constraints     r1   $test_pandas_na_constraint_with_pd_nar    sX    			X	&B')M((////,,RXXi-@AAAAAr4   c                      [        5       n U R                  / SQ5      (       d   eU R                  [        S5      5      (       d   eU R                  S5      (       a   eg)zGCheck that a string does not satisfy the _IterableNotString constraint.r   r   zsome stringN)r   r   ranger   s    r1   test_iterable_not_stringr    sV    $&J%%i0000%%eBi0000))-88888r4   c                  4   [        5       n U R                  S5      (       d   eU R                  [        5       5      (       d   eU R                  SS/SS/4SS/SS/4/5      (       d   eU R                  S5      (       d   eU R                  S5      (       a   eg)zQCheck that the _CVObjects constraint accepts all current ways
to pass cv objects.r   ro   r[   r   r   Nznot a CV object)r   r   r   r   s    r1   test_cv_objectsr    s     J%%a((((%%km4444%%AA'71a&1a&9I&JKKKK%%d++++))*;<<<<<r4   c                  J     " S S[         5      n U " SS9R                  5         g)zCheck that the validation from a scikit-learn estimator inherited by a third
party estimator does not impose a match between the dict of constraints and the
parameters of the estimator.
c                   8   ^  \ rS rSrU 4S jrSU 4S jjrSrU =r$ )7test_third_party_estimator.<locals>.ThirdPartyEstimatori  c                 ,   > Xl         [        TU ]	  SS9  g )Nr   rL   )r(   superrM   )r:   r(   r   s     r1   rM   @test_third_party_estimator.<locals>.ThirdPartyEstimator.__init__  s    FGq!r4   c                 $   > [         TU ]  X5        g rK   )r!  rR   )r:   rP   rQ   r   s      r1   rR   ;test_third_party_estimator.<locals>.ThirdPartyEstimator.fit  s    GKr4   r(   rU   )r@   rA   rB   rC   rM   rR   rE   __classcell__)r   s   @r1   ThirdPartyEstimatorr    s    	"	 	r4   r'  r   r%  N)rG   rR   )r'  s    r1   test_third_party_estimatorr(    s!    j  !  "r4   c                      [        [        SSSS9n U R                  S5      (       d   eU R                  S5      (       a   eg)z9Check for the type RealNotInt in the Interval constraint.r   ro   r`   r]   rs   N)r   r   r   r   s    r1   test_interval_real_not_intr*    sC    *a6:J%%c****))!,,,,,r4   c                     [        S[        5      (       d   e[        S[        5      (       a   e[        [        R                  " S5      [        5      (       d   e[        [        R                  " S5      [        5      (       a   eg)zCheck for the RealNotInt type.rs   ro   N)
isinstancer   rk   float64int64r.   r4   r1   test_real_not_intr/    sa    c:&&&&!Z((((bjjmZ0000"((1+z22222r4   c                      [        S[        /0SS9S 5       n [        R                  " [        SS9   U " SS9  S	S	S	5        [        SS
9   U " SS9  S	S	S	5        g	! , (       d  f       N'= f! , (       d  f       g	= f)z@Check that param validation can be skipped using config_context.r'   Tr+   c                     g rK   r.   rL   s    r1   r   %test_skip_param_validation.<locals>.f  rT   r4   The 'a' parameterrw   1rL   Nskip_parameter_validation)r%   r   ry   rz   r   r   r  s    r1   test_skip_param_validationr7    so     cC5\F G 
,4G	H	C 
I 
$	7	C 
8	7	 
I	H 
8	7s   A	A*
A'*
A8r,   Fc                 h  ^ [        S[        /0SS9S 5       m[        S[        /0U S9U4S j5       n[        R                  " [        SS9   U" S	S
9  SSS5        U (       a  U" SS
9  g[        R                  " [        SS9   U" SS
9  SSS5        g! , (       d  f       NE= f! , (       d  f       g= f)z,Check that nested validation can be skipped.r'   Tr+   c                     g rK   r.   rL   s    r1   r   &test_skip_nested_validation.<locals>.f  rT   r4   r(   c                    > T" SS9$ )Ninvalid_param_valuerL   r.   )r(   r   s    r1   g&test_skip_nested_validation.<locals>.g  s     ())r4   zThe 'b' parameterrw   r<  r%  Nro   r3  r  )r,   r=  r   s     @r1   test_skip_nested_validationr?    s     cC5\F G 	se&C*	*
 
,4G	H	!" 
I %	A]]08KLF ML 
I	H MLs   BB#
B #
B1zJskip_parameter_validation, prefer_skip_nested_validation, expected_skipped))TTT)TFT)FTT)FFFc                     [        S[        /0US9S 5       n[        U S9   U" S5      nSSS5        WU:X  d   eg! , (       d  f       N= f)z5Check interaction between global skip and local skip.r'   r+   c                     [        5       S   $ )Nr6  )r   rL   s    r1   r=  9test_skip_nested_validation_and_config_context.<locals>.g
  s     |788r4   r5  ro   N)r%   r   r   )r6  r,   expected_skippedr=  actual_skippeds        r1   .test_skip_nested_validation_and_config_contextrE    s\     	se4Q99 
2K	L1 
M ---- 
M	Ls	   	;
A	)r   )enumbersr   r   numpyrk   ry   scipy.sparser   r   sklearn._configr   r   sklearn.baser	   r
   sklearn.model_selectionr   sklearn.utilsr   sklearn.utils._param_validationr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   sklearn.utils.fixesr&   r2   r6   rG   markparametrizerd   ri   rn   rr   	TypeErrorr   r}   r   r   r   ndarrayr   r   r   r   r   r   r   rt   float32r-  callabler  randomRandomStaterq   rh   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r(  r*  r/  r7  r?  rE  )	containers   0r1   <module>rX     s
   "   . 6 4 / $      4 / &vTF$8"&:a :	:
, 
,
 
 8T*:; <& 8T*:;# <#(#  dAq((4tF*ST"	"
  sQ&IL	
 q3)LL	
 ta6J5	
 q47K7	
 q2H,	
+<=<./ 	e	5	w	_%	GGC( tQv.q$v.tT)4?#4(555 % XtQw7ZQv6	

 XtQw7ZQy9	

 XtQw7ZAf5	

 XtQw7ZD8	

 XtQw7ZD;	

 Xq$v6ZQv6	

 Xq$v6ZQy9	

 Xq$v6ZAf5	

 Xq$v6Zr&9	

 Xq$v6Zr)<	

 Xr1V4Zq9	

 Xr1V4ZD8	

 Xr1V4Zb;	

 Xr1V4Zb9	

 Xr1Y7ZBy9	

 Xr1Y7ZBv6	

 Xq$v6ZAf5	

 Xq$v6ZAf5	
KILZ
;[LZ
; T4i8	// T4(?#)$4i81b31d95495q!I.q$v.tQw/5-6-76- #	$1V	,d3	(AtI	6;	O	$c*	

BJJ/	0"**=	?#	AA'(	rxx!Q!Q 012	*q!fq!f%567	)aVaV$456! ,

+	 i!Q!Q(89:+

! 	!  
..q12!!" 	#!$ 
%!& 
a'!( 
s)!* 	+!, 	-!. 
/!0 
"1!2 
$3!4 
!T'"5!6 
$7!8 
%,'9!: 
"&&!;!< 
)$=!> 
E	JO,?!@ 	A!$J-K$J- 7	$1V	,h7	Y	*	+Z8	d|	$g.	{#	/*	'		:	l	I	N#	D	)=9	E	J'	j!		 !*=+*=23D	01 ;20!2C,B9=#&-3 84-H I4 P..W

s   "[0