Skip to content

Commit 5ad344e

Browse files
committed
update a few more tests
1 parent 5b10864 commit 5ad344e

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

dpnp/tests/test_fft.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,9 @@ class TestFftn:
433433
def setup_method(self):
434434
numpy.random.seed(42)
435435

436-
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
436+
@pytest.mark.parametrize(
437+
"dtype", get_all_dtypes(no_bool=True, no_none=True)
438+
)
437439
@pytest.mark.parametrize(
438440
"axes", [None, (0, 1, 2), (-1, -4, -2), (-2, -4, -1, -3)]
439441
)

dpnp/tests/test_linalg.py

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def test_eigenvalues(self, func, shape, dtype, order):
513513
# non-symmetric for eig() and eigvals()
514514
is_hermitian = func in ("eigh, eigvalsh")
515515
a = generate_random_numpy_array(
516-
shape, dtype, hermitian=is_hermitian, seed_value=81, low=-4, high=4
516+
shape, dtype, hermitian=is_hermitian, low=-4, high=4
517517
)
518518
a_order = numpy.array(a, order=order)
519519
a_dp = dpnp.array(a, order=order)
@@ -2384,9 +2384,7 @@ class TestQr:
23842384
)
23852385
@pytest.mark.parametrize("mode", ["r", "raw", "complete", "reduced"])
23862386
def test_qr(self, dtype, shape, mode):
2387-
# Set seed_value=81 to prevent
2388-
# random generation of the input singular matrix
2389-
a = generate_random_numpy_array(shape, dtype, seed_value=81)
2387+
a = generate_random_numpy_array(shape, dtype)
23902388
ia = dpnp.array(a)
23912389

23922390
if mode == "r":
@@ -2514,13 +2512,8 @@ def test_solve(self, dtype):
25142512
],
25152513
)
25162514
def test_solve_broadcast(self, a_shape, b_shape, dtype):
2517-
# Set seed_value=81 to prevent
2518-
# random generation of the input singular matrix
2519-
a_np = generate_random_numpy_array(a_shape, dtype, seed_value=81)
2520-
2521-
# Set seed_value=76 to prevent
2522-
# random generation of the input singular matrix
2523-
b_np = generate_random_numpy_array(b_shape, dtype, seed_value=76)
2515+
a_np = generate_random_numpy_array(a_shape, dtype)
2516+
b_np = generate_random_numpy_array(b_shape, dtype)
25242517

25252518
a_dp = dpnp.array(a_np)
25262519
b_dp = dpnp.array(b_np)
@@ -2844,11 +2837,7 @@ def test_svd(self, dtype, shape):
28442837
"shape", [(2, 2), (16, 16)], ids=["(2, 2)", "(16, 16)"]
28452838
)
28462839
def test_svd_hermitian(self, dtype, compute_vt, shape):
2847-
# Set seed_value=81 to prevent
2848-
# random generation of the input singular matrix
2849-
a = generate_random_numpy_array(
2850-
shape, dtype, hermitian=True, seed_value=81
2851-
)
2840+
a = generate_random_numpy_array(shape, dtype, hermitian=True)
28522841
dp_a = dpnp.array(a)
28532842

28542843
if compute_vt:
@@ -2965,8 +2954,6 @@ def check_types_shapes(self, dp_B, np_B):
29652954
],
29662955
)
29672956
def test_pinv(self, dtype, shape):
2968-
# Set seed_value=81 to prevent
2969-
# random generation of the input singular matrix
29702957
a = generate_random_numpy_array(shape, dtype, seed_value=81)
29712958
a_dp = dpnp.array(a)
29722959

@@ -2990,10 +2977,8 @@ def test_pinv(self, dtype, shape):
29902977
"shape", [(2, 2), (16, 16)], ids=["(2, 2)", "(16, 16)"]
29912978
)
29922979
def test_pinv_hermitian(self, dtype, shape):
2993-
# Set seed_value=81 to prevent
2994-
# random generation of the input singular matrix
29952980
a = generate_random_numpy_array(
2996-
shape, dtype, hermitian=True, seed_value=81, low=-3, high=3
2981+
shape, dtype, hermitian=True, low=-5, high=5
29972982
)
29982983
a_dp = dpnp.array(a)
29992984

0 commit comments

Comments
 (0)