Skip to content

Commit f80fa9b

Browse files
Update cupy tests for solve()
1 parent c2b3450 commit f80fa9b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

dpnp/tests/third_party/cupy/linalg_tests/test_solve.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ def test_solve(self):
6060
# for other cases this signature must be followed
6161
# (..., m, m), (..., m, n) -> (..., m, n)
6262
# https://github.com/numpy/numpy/pull/25914
63-
if numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0":
64-
self.check_x((2, 4, 4), (2, 4))
65-
self.check_x((2, 3, 2, 2), (2, 3, 2))
66-
self.check_x((0, 2, 2), (0, 2))
67-
else: # Allowed since numpy 2.0
63+
if numpy.lib.NumpyVersion(numpy.__version__) >= "2.0.0":
6864
self.check_x((2, 3, 3), (3,))
6965
self.check_x((2, 5, 3, 3), (3,))
7066

@@ -101,11 +97,8 @@ def test_invalid_shape(self):
10197
self.check_shape((3, 3, 4), (3,), linalg_errors)
10298
self.check_shape((3, 3), (0,), value_errors)
10399
self.check_shape((0, 3, 4), (3,), linalg_errors)
104-
# Since numpy >= 2.0, this case does not raise an error
105-
if numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0":
106-
self.check_shape((2, 3, 3), (3,), value_errors)
107-
else:
108-
# Not allowed since numpy 2
100+
# Not allowed since numpy 2.0
101+
if numpy.lib.NumpyVersion(numpy.__version__) >= "2.0.0":
109102
self.check_shape((0, 2, 2), (0, 2), value_errors)
110103
self.check_shape((2, 4, 4), (2, 4), value_errors)
111104
self.check_shape((2, 3, 2, 2), (2, 3, 2), value_errors)

0 commit comments

Comments
 (0)