Skip to content

Commit 673625b

Browse files
authored
FIX make check_complex_data deterministic (#20221)
1 parent 7781256 commit 673625b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sklearn/utils/estimator_checks.py

+1
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,7 @@ def check_complex_data(name, estimator_orig):
967967
# Something both valid for classification and regression
968968
y = rng.randint(low=0, high=2, size=10) + 1j
969969
estimator = clone(estimator_orig)
970+
set_random_state(estimator, random_state=0)
970971
with raises(ValueError, match="Complex data not supported"):
971972
estimator.fit(X, y)
972973

0 commit comments

Comments
 (0)