test cumprod, cumsum with numpy input
@@ -248,6 +248,12 @@ class TestCumsum(unittest.TestCase):
def test_cumsum_arraylike(self, xp):
return xp.cumsum((1, 2, 3))
+ @testing.for_float_dtypes()
+ @testing.numpy_cupy_allclose()
+ def test_cumsum_numpy_array(self, xp, dtype):
+ a_numpy = numpy.arange(8, dtype=dtype)
+ return xp.cumsum(a_numpy)
+
@testing.gpu
class TestCumprod(unittest.TestCase):
@@ -318,3 +324,9 @@ class TestCumprod(unittest.TestCase):
@testing.numpy_cupy_allclose()
def test_cumprod_arraylike(self, xp):
return xp.cumprod((1, 2, 3))
+
+ @testing.for_float_dtypes()
+ @testing.numpy_cupy_allclose()
+ def test_cumprod_numpy_array(self, xp, dtype):
+ a_numpy = numpy.arange(1, 6, dtype=dtype)
+ return xp.cumprod(a_numpy)
