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")
| 1320 | |
| 1321 | @derived_from(np) |
| 1322 | def 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 | |
| 1347 | def topk(a, k, axis=-1, split_every=None): |
no test coverage detected
searching dependent graphs…