Skip to content

Commit

Permalink
Remove test_cond_nan_input from TestCond (#2221)
Browse files Browse the repository at this point in the history
This PR suggests removing `test_cond_input_nan` due to undefined
behavior for different backend in different versions of OpenBLAS and
OneMKL to avoid possible future falls

_Checking all input for nan's is expensive, so MKL lapack functions
don't do it_
  • Loading branch information
vlad-perevezentsev authored Dec 10, 2024
1 parent 11487c5 commit 48babd0
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions dpnp/tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,16 +341,6 @@ def test_bool(self, p):
expected = numpy.linalg.cond(a, p=p)
assert_dtype_allclose(result, expected)

@pytest.mark.parametrize("p", [-dpnp.inf, -1, 1, dpnp.inf, "fro"])
def test_nan_input(self, p):
a = generate_random_numpy_array((3, 3))
a[1, 1] = numpy.nan
ia = dpnp.array(a)

result = dpnp.linalg.cond(ia, p=p)
expected = numpy.linalg.cond(a, p=p)
assert_dtype_allclose(result, expected)

@pytest.mark.parametrize(
"p", [None, -dpnp.inf, -2, -1, 1, 2, dpnp.inf, "fro"]
)
Expand Down

0 comments on commit 48babd0

Please sign in to comment.