dpnp.cumprod

dpnp.cumprod(x1, **kwargs)[source]

Return the cumulative product of elements along a given axis.

For full documentation refer to numpy.cumprod.

Limitations

Parameter x is supported as dpnp.ndarray. Keyword argument kwargs is currently unsupported. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Available array data types.

Examples

>>> import dpnp as np
>>> a = np.array([1, 2, 3])
>>> result = np.cumprod(a)
>>> [x for x in result]
[1, 2, 6]
>>> b = np.array([[1, 2, 3], [4, 5, 6]])
>>> result = np.cumprod(b)
>>> [x for x in result]
[1, 2, 6, 24, 120, 720]