Skip to content

Commit

Permalink
Merge pull request scipy#9277 from ev-br/test_gmres_noseed
Browse files Browse the repository at this point in the history
MAINT: sparse/linalg: make test deterministic
  • Loading branch information
rgommers authored Sep 16, 2018
2 parents 235cc97 + 2216702 commit 4fcd7f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scipy/sparse/linalg/isolve/tests/test_iterative.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ def test_atol_legacy(self):
assert_(np.linalg.norm(A.dot(x) - b) <= 1e-5*np.linalg.norm(b))
assert_allclose(x, b, atol=0, rtol=1e-8)

A = np.random.rand(30, 30)
rndm = np.random.RandomState(12345)
A = rndm.rand(30, 30)
b = 1e-6 * ones(30)
x, info = gmres(A, b, tol=1e-7, restart=20)
assert_(np.linalg.norm(A.dot(x) - b) > 1e-7)
Expand Down

0 comments on commit 4fcd7f4

Please sign in to comment.