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

Function _pass_extra_kwargs

dask/array/core.py:538–546  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

536
537
538def _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
549def map_blocks(

Callers

nothing calls this directly

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected