MCPcopy Index your code
hub / github.com/dask/dask / cumsum

Function cumsum

dask/array/reductions.py:1296–1318  ·  view source on GitHub ↗

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. * 'blell

(x, axis=None, dtype=None, out=None, method="sequential")

Source from the content-addressed store, hash-verified

1294
1295@derived_from(np)
1296def cumsum(x, axis=None, dtype=None, out=None, method="sequential"):
1297 """Dask added an additional keyword-only argument ``method``.
1298
1299 method : {'sequential', 'blelloch'}, optional
1300 Choose which method to use to perform the cumsum. Default is 'sequential'.
1301
1302 * 'sequential' performs the cumsum of each prior block before the current block.
1303 * 'blelloch' is a work-efficient parallel cumsum. It exposes parallelism by
1304 first taking the sum of each block and combines the sums via a binary tree.
1305 This method may be faster or more memory efficient depending on workload,
1306 scheduler, and hardware. More benchmarking is necessary.
1307 """
1308 return cumreduction(
1309 np.cumsum,
1310 _cumsum_merge,
1311 0,
1312 x,
1313 axis,
1314 dtype,
1315 out=out,
1316 method=method,
1317 preop=np.sum,
1318 )
1319
1320
1321@derived_from(np)

Callers 1

cumsumMethod · 0.90

Calls 1

cumreductionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…