Skip to content

Commit 4bb41cb

Browse files
committed
BUG: Make a RandomState object and use it in test_transformers(). Fixes scikit-learn#1368.
1 parent 489aab4 commit 4bb41cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sklearn/tests/test_common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ def test_transformers():
180180
# fit
181181

182182
if Trans in (_PLS, PLSCanonical, PLSRegression, CCA, PLSSVD):
183-
y_ = np.vstack([y, 2 * y + np.random.randint(2, size=len(y))])
183+
random_state = np.random.RandomState(seed=12345)
184+
y_ = np.vstack([y, 2 * y + random_state.randint(2, size=len(y))])
184185
y_ = y_.T
185186
else:
186187
y_ = y

0 commit comments

Comments
 (0)