summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2021-05-08 16:09:14 +0200
committerGitHub <noreply@github.com>2021-05-08 16:09:14 +0200
commitd490589e01a5d232d8ed0b8f37ce8bffc1f21ec6 (patch)
treeabf30adb88b8296c4e766d8cb6f5c3bbd9b8a82d /numpy
parentd908afddfad9508f837aadc6b8c29dd0c94694a1 (diff)
parentacf249e0c663f148ee6389327f0b35298fc14833 (diff)
downloadnumpy-d490589e01a5d232d8ed0b8f37ce8bffc1f21ec6.tar.gz
Merge pull request #18943 from rgommers/xfail-svd-nan
TST: xfail `TestCond.test_nan` unconditionally
Diffstat (limited to 'numpy')
-rw-r--r--numpy/linalg/tests/test_linalg.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index 8a270f194..c6e8cdd03 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -684,7 +684,7 @@ class SVDHermitianCases(HermitianTestCase, HermitianGeneralizedTestCase):
axes = list(range(mat.ndim))
axes[-1], axes[-2] = axes[-2], axes[-1]
return np.conj(np.transpose(mat, axes=axes))
-
+
assert_almost_equal(np.matmul(u, hermitian(u)), np.broadcast_to(np.eye(u.shape[-1]), u.shape))
assert_almost_equal(np.matmul(vt, hermitian(vt)), np.broadcast_to(np.eye(vt.shape[-1]), vt.shape))
assert_equal(np.sort(s)[..., ::-1], s)
@@ -766,6 +766,9 @@ class TestCond(CondCases):
for A, p in itertools.product(As, p_neg):
linalg.cond(A, p)
+ @pytest.mark.xfail(True, run=False,
+ reason="Platform/LAPACK-dependent failure, "
+ "see gh-18914")
def test_nan(self):
# nans should be passed through, not converted to infs
ps = [None, 1, -1, 2, -2, 'fro']
@@ -981,7 +984,7 @@ class TestLstsq(LstsqCases):
linalg.lstsq(A, y, rcond=None)
-@pytest.mark.parametrize('dt', [np.dtype(c) for c in '?bBhHiIqQefdgFDGO'])
+@pytest.mark.parametrize('dt', [np.dtype(c) for c in '?bBhHiIqQefdgFDGO'])
class TestMatrixPower:
rshft_0 = np.eye(4)
@@ -1010,7 +1013,7 @@ class TestMatrixPower:
mz = matrix_power(M, 0)
assert_equal(mz, identity_like_generalized(M))
assert_equal(mz.dtype, M.dtype)
-
+
for mat in self.rshft_all:
tz(mat.astype(dt))
if dt != object: