Skip to content

Commit

Permalink
svd_flip test fails on Travis. Change random seed, see if it helps
Browse files Browse the repository at this point in the history
  • Loading branch information
vene authored and amueller committed Dec 24, 2012
1 parent 4040d42 commit 5aed364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/utils/tests/test_extmath.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def test_cartesian():
def test_randomized_svd_sign_flip():
a = np.array([[2.0, 0.0], [0.0, 1.0]])
mismatch = False # At least one pair should lead to mismatch
u1, s1, v1 = randomized_svd(a, 2, flip_sign=True, random_state=0)
u1, s1, v1 = randomized_svd(a, 2, flip_sign=True, random_state=41)
for seed in xrange(100):
u2, s2, v2 = randomized_svd(a, 2, flip_sign=False, random_state=seed)
if np.any(np.sign(u1) != np.sign(u2)):
Expand Down

0 comments on commit 5aed364

Please sign in to comment.