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