dpnp.nancumsum

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

Return the cumulative sum of the elements along a given axis.

For full documentation refer to numpy.nancumsum.

Limitations

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

See also

dpnp.cumsum : Return the cumulative sum of the elements along a given axis.

Examples

>>> import dpnp as np
>>> a = np.array([1., np.nan])
>>> result = np.nancumsum(a)
>>> [x for x in result]
[1.0, 1.0]
>>> b = np.array([[1., 2., np.nan], [4., np.nan, 6.]])
>>> result = np.nancumprod(b)
>>> [x for x in result]
[1.0, 3.0, 3.0, 7.0, 7.0, 13.0]