Permalink
Browse files

Use assert_array_almost_equal to avoid failure by rounding errors.

The solve function may call a cblas function whereas the lu_factor +
lu_solve always calls fblas. The results may differ by some rounding
errors.

This fixes ticket #1504
  • Loading branch information...
1 parent 1532fc3 commit b8e28ef767e6f4e8a3e270b803a28f2bed4e6c0d @fabianp fabianp committed Aug 31, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 scipy/linalg/tests/test_decomp.py
@@ -725,7 +725,7 @@ def test_lu(self):
lu_a = lu_factor(a)
x2 = lu_solve(lu_a,b)
- assert_array_equal(x1,x2)
+ assert_array_almost_equal(x1,x2)
class TestSVD(TestCase):
def setUp(self):

0 comments on commit b8e28ef

Please sign in to comment.