Helper for :func:`dask.array.map_blocks` to pass `block_info` or `block_id`. For each element of `keys`, a corresponding element of args is changed to a keyword argument with that key, before all arguments re passed on to `func`.
(func, keys, *args, **kwargs)
| 533 | |
| 534 | |
| 535 | def _pass_extra_kwargs(func, keys, *args, **kwargs): |
| 536 | """Helper for :func:`dask.array.map_blocks` to pass `block_info` or `block_id`. |
| 537 | |
| 538 | For each element of `keys`, a corresponding element of args is changed |
| 539 | to a keyword argument with that key, before all arguments re passed on |
| 540 | to `func`. |
| 541 | """ |
| 542 | kwargs.update(zip(keys, args)) |
| 543 | return func(*args[len(keys) :], **kwargs) |
| 544 | |
| 545 | |
| 546 | def map_blocks( |