diff --git a/dpnp/tests/third_party/cupy/math_tests/test_sumprod.py b/dpnp/tests/third_party/cupy/math_tests/test_sumprod.py index 4be70c0c54d9..c0cce93be8e2 100644 --- a/dpnp/tests/third_party/cupy/math_tests/test_sumprod.py +++ b/dpnp/tests/third_party/cupy/math_tests/test_sumprod.py @@ -784,6 +784,23 @@ def test_cumsum_axis(self, xp, dtype, axis): a = testing.shaped_arange(tuple(range(4, 4 + n)), xp, dtype) return self._cumsum(xp, a, axis=axis) + @testing.for_all_dtypes() + @testing.numpy_cupy_allclose(contiguous_check=False) + @pytest.mark.parametrize("order", ["C", "F"]) + def test_cumsum_no_axis(self, xp, dtype, order): + a = testing.shaped_arange((4, 3), xp, dtype) + out = xp.empty((12,), dtype=dtype) + + if order in ("c", "C"): + out = xp.ascontiguousarray(out) + elif order in ("f", "F"): + out = xp.asfortranarray(out) + + b = a.copy() + xp.cumsum(a, out=out, dtype=dtype) + testing.assert_array_equal(a, b) # Check if input array is overwritten + return out + @pytest.mark.parametrize("axis", axes) @testing.for_all_dtypes() @testing.numpy_cupy_allclose()