accum

arrayfire.accum(array: Array, /, axis: int = 0) Array

Calculate the cumulative sum of elements along a specified dimension.

Parameters

arrayaf.Array

Multi-dimensional ArrayFire array.

axisint, optional, default: 0

Dimension along which the cumulative sum is required.

Returns

af.Array

An ArrayFire array of the same size as array containing the cumulative sum along the specified dimension.

Note

If axis is not specified, the cumulative sum is calculated along the first dimension (default: 0).