Skip to content

Commit

Permalink
TST: fix failing linalg.qz float32 test by decreasing precision.
Browse files Browse the repository at this point in the history
For float32 the default precision of `decimal=6` was too high for my
machine, `decimal=5` seems reasonable.

This was with MKL 2018.01, Python 3.6, NumPy and MKL installed via
Conda.
  • Loading branch information
rgommers authored and larsoner committed Mar 26, 2018
1 parent 5956362 commit 90d8d0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scipy/linalg/tests/test_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2012,10 +2012,10 @@ def test_qz_single(self):
A = random([n,n]).astype(float32)
B = random([n,n]).astype(float32)
AA,BB,Q,Z = qz(A,B)
assert_array_almost_equal(dot(dot(Q,AA),Z.T), A)
assert_array_almost_equal(dot(dot(Q,BB),Z.T), B)
assert_array_almost_equal(dot(Q,Q.T), eye(n))
assert_array_almost_equal(dot(Z,Z.T), eye(n))
assert_array_almost_equal(dot(dot(Q,AA),Z.T), A, decimal=5)
assert_array_almost_equal(dot(dot(Q,BB),Z.T), B, decimal=5)
assert_array_almost_equal(dot(Q,Q.T), eye(n), decimal=5)
assert_array_almost_equal(dot(Z,Z.T), eye(n), decimal=5)
assert_(all(diag(BB) >= 0))

def test_qz_double(self):
Expand Down

0 comments on commit 90d8d0d

Please sign in to comment.