Skip to content

Commit

Permalink
TST: sparse.linalg: Loosen tolerance for the lobpcg test 'test_tolera…
Browse files Browse the repository at this point in the history
…nce_float32' (#16755)

This test has been failing occasionally in CI, with errors slightly greater than
the requested tolerances.

(cherry picked from commit f71e7fa)
  • Loading branch information
WarrenWeckesser authored and rgommers committed Aug 26, 2022
1 parent c055c31 commit cc0a2bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
Expand Up @@ -351,8 +351,8 @@ def test_tolerance_float32():
A = A.astype(np.float32)
X = rnd.standard_normal((n, m))
X = X.astype(np.float32)
eigvals, _ = lobpcg(A, X, tol=1e-5, maxiter=50, verbosityLevel=0)
assert_allclose(eigvals, -np.arange(1, 1 + m), atol=1.5e-5)
eigvals, _ = lobpcg(A, X, tol=1.25e-5, maxiter=50, verbosityLevel=0)
assert_allclose(eigvals, -np.arange(1, 1 + m), atol=2e-5, rtol=1e-5)


def test_random_initial_float32():
Expand Down

0 comments on commit cc0a2bf

Please sign in to comment.