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

Function nancumsum

dask/array/reductions.py:214–236  ·  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

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

Callers

nothing calls this directly

Calls 1

cumreductionFunction · 0.85

Tested by

no test coverage detected