summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/linalg/tests/test_regression.py13
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()