MCPcopy
hub / github.com/dask/dask / cumprod

Function cumprod

dask/array/reductions.py:1322–1344  ·  view source on GitHub ↗

Dask added an additional keyword-only argument ``method``. method : {'sequential', 'blelloch'}, optional Choose which method to use to perform the cumprod. Default is 'sequential'. * 'sequential' performs the cumprod of each prior block before the current block. * 'ble

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

Source from the content-addressed store, hash-verified

1320
1321@derived_from(np)
1322def cumprod(x, axis=None, dtype=None, out=None, method="sequential"):
1323 """Dask added an additional keyword-only argument ``method``.
1324
1325 method : {'sequential', 'blelloch'}, optional
1326 Choose which method to use to perform the cumprod. Default is 'sequential'.
1327
1328 * 'sequential' performs the cumprod of each prior block before the current block.
1329 * 'blelloch' is a work-efficient parallel cumprod. It exposes parallelism by first
1330 taking the product of each block and combines the products via a binary tree.
1331 This method may be faster or more memory efficient depending on workload,
1332 scheduler, and hardware. More benchmarking is necessary.
1333 """
1334 return cumreduction(
1335 np.cumprod,
1336 _cumprod_merge,
1337 1,
1338 x,
1339 axis,
1340 dtype,
1341 out=out,
1342 method=method,
1343 preop=np.prod,
1344 )
1345
1346
1347def topk(a, k, axis=-1, split_every=None):

Callers 1

cumprodMethod · 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…