dask.array.Array.cumsum

Array.cumsum(axis=None, dtype=None, out=None)[source]

This docstring was copied from numpy.ndarray.cumsum.

Some inconsistencies with the Dask version may exist.

Dask added an additional keyword-only argument method.

method{‘sequential’, ‘blelloch’}, optional

Choose which method to use to perform the cumsum. Default is ‘sequential’.

  • ‘sequential’ performs the cumsum of each prior block before the current block.

  • ‘blelloch’ is a work-efficient parallel cumsum. It exposes parallelism by first taking the sum of each block and combines the sums via a binary tree. This method may be faster or more memory efficient depending on workload, scheduler, and hardware. More benchmarking is necessary.

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

Refer to numpy.cumsum for full documentation.

See also

numpy.cumsum

equivalent function