Skip to content

Commit cfffda4

Browse files
committed
update test_sycl_queue.py to include cumulative_sum and cumulative_prod only if NumPy > = 2.1.0
1 parent ab6fccf commit cfffda4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_sycl_queue.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,14 @@ def test_1in_1out(func, data, device):
558558
# `trapezoid` is available from NumPy 2.0
559559
func = "trapz"
560560

561+
if (
562+
func in ["cumulative_prod", "cumulative_sum"]
563+
and numpy.lib.NumpyVersion(numpy.__version__) < "2.1.0"
564+
):
565+
pytest.skip(
566+
"cumulative_prod and cumulative_sum are available from NumPy 2.1"
567+
)
568+
561569
x_orig = dpnp.asnumpy(x)
562570
expected = getattr(numpy, func)(x_orig)
563571
assert_dtype_allclose(result, expected)

0 commit comments

Comments
 (0)