diff options
author | David Cournapeau <cournape@gmail.com> | 2008-03-21 13:28:29 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-03-21 13:28:29 +0000 |
commit | ea1b8365a1f77e4c23f8289144a554517cac02c8 (patch) | |
tree | 236729a3d03955261d4eb2765c613e62f31097d0 /numpy/linalg | |
parent | 51a6dc75ae5f6e428493bba7e49150a3d6705aa6 (diff) | |
download | numpy-ea1b8365a1f77e4c23f8289144a554517cac02c8.tar.gz |
Add regression test for #662.
Diffstat (limited to 'numpy/linalg')
-rw-r--r-- | numpy/linalg/tests/test_regression.py | 13 |
1 files changed, 12 insertions, 1 deletions
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() |