Skip to content

Commit ae23b19

Browse files
veneGaelVaroquaux
authored andcommitted
Make common PLS tests more stable
1 parent 652a873 commit ae23b19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sklearn/tests/test_common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,8 @@ def test_transformers():
191191
# fit
192192

193193
if name in ('PLSCanonical', 'PLSRegression', 'CCA', 'PLSSVD'):
194-
random_state = np.random.RandomState(seed=12345)
195-
y_ = np.vstack([y, 2 * y + random_state.randint(2, size=len(y))])
196-
y_ = y_.T
194+
y_ = np.c_[y, y]
195+
y_[::2, 1] *= 2
197196
else:
198197
y_ = y
199198

0 commit comments

Comments
 (0)