From ea1b8365a1f77e4c23f8289144a554517cac02c8 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Fri, 21 Mar 2008 13:28:29 +0000 Subject: Add regression test for #662. --- numpy/linalg/tests/test_regression.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'numpy/linalg/tests') diff --git a/numpy/linalg/tests/test_regression.py b/numpy/linalg/tests/test_regression.py index 4e2295539..9ea892a15 100644 --- a/numpy/linalg/tests/test_regression.py +++ b/numpy/linalg/tests/test_regression.py @@ -3,7 +3,7 @@ from numpy.testing import * set_package_path() -from numpy import linalg, arange, float64 +from numpy import linalg, arange, float64, array restore_path() rlevel = 1 @@ -30,5 +30,16 @@ class TestRegression(NumpyTestCase): va, ve = linalg.eig(a) assert_array_almost_equal(va, rva) + def test_eigh_build(self, level = rlevel): + """Ticket 662.""" + rvals = [68.60568999, 89.57756725, 106.67185574] + + cov = array([[ 77.70273908, 3.51489954, 15.64602427], + [3.51489954, 88.97013878, -1.07431931], + [15.64602427, -1.07431931, 98.18223512]]) + + vals, vecs = linalg.eigh(cov) + assert_array_almost_equal(vals, rvals) + if __name__ == '__main__': NumpyTest().run() -- cgit v1.2.1