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")
| 1294 | |
| 1295 | @derived_from(np) |
| 1296 | def 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) |
no test coverage detected
searching dependent graphs…