ivy.cumsum(x, axis=0, f=None)[source]

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

  • x (array) – Input array.

  • axis (int) – Axis along which the cumulative sum is computed. By default 0.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


Input array with cumulatively summed elements along axis.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty