MCPcopy
hub / github.com/dask/dask / _pass_extra_kwargs

Function _pass_extra_kwargs

dask/array/core.py:540–548  ·  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

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

Callers

nothing calls this directly

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…