diff options
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 2 | ||||
-rw-r--r-- | numpy/linalg/tests/test_linalg.py | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 6b7a1efc2..fc8781fda 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -755,7 +755,7 @@ class TestNaNFuncts(TestCase): [ 0.91084584, 0.84386844, 0.37068164]])) def test_nanmin_allnan_on_axis(self): - assert_equal(isnan(nanmin([[nan]*2]*3, axis=1)), + assert_array_equal(isnan(nanmin([[nan]*2]*3, axis=1)), [True, True, True]) diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py index 3330db2a3..849f30a50 100644 --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -240,22 +240,22 @@ class HermitianTestCase(object): class TestEigvalsh(HermitianTestCase, TestCase): def do(self, a): + # note that eigenvalue arrays must be sorted since + # their order isn't guaranteed. ev = linalg.eigvalsh(a) - # flip resulting eigenvalue array, since they are returned in - # reverse order from the values given by linal.eig - ev = ev[::-1] - evalues, evectors = linalg.eig(a) + ev.sort() + evalues.sort() assert_almost_equal(ev, evalues) class TestEigh(HermitianTestCase, TestCase): def do(self, a): + # note that eigenvalue arrays must be sorted since + # their order isn't guaranteed. ev, evc = linalg.eigh(a) - # flip resulting eigenvalue array, since they are returned in - # reverse order from the values given by linal.eig - ev = ev[::-1] - evalues, evectors = linalg.eig(a) + ev.sort() + evalues.sort() assert_almost_equal(ev, evalues) class _TestNorm(TestCase): |