MCPcopy Create free account
hub / github.com/dask/dask / nancumsum

Function nancumsum

dask/array/reductions.py:215–237  ·  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, dtype=None, out=None, *, method="sequential")

Source from the content-addressed store, hash-verified

213
214@derived_from(np)
215def nancumsum(x, axis, dtype=None, out=None, *, method="sequential"):
216 """Dask added an additional keyword-only argument ``method``.
217
218 method : {'sequential', 'blelloch'}, optional
219 Choose which method to use to perform the cumsum. Default is 'sequential'.
220
221 * 'sequential' performs the cumsum of each prior block before the current block.
222 * 'blelloch' is a work-efficient parallel cumsum. It exposes parallelism by
223 first taking the sum of each block and combines the sums via a binary tree.
224 This method may be faster or more memory efficient depending on workload,
225 scheduler, and hardware. More benchmarking is necessary.
226 """
227 return cumreduction(
228 chunk.nancumsum,
229 operator.add,
230 0,
231 x,
232 axis,
233 dtype,
234 out=out,
235 method=method,
236 preop=np.nansum,
237 )
238
239
240@derived_from(np)

Callers

nothing calls this directly

Calls 1

cumreductionFunction · 0.85

Tested by

no test coverage detected