MCPcopy
hub / github.com/dask/dask / index_subs

Function index_subs

dask/blockwise.py:212–217  ·  view source on GitHub ↗

A simple subs function that works both on tuples and strings

(ind, substitution)

Source from the content-addressed store, hash-verified

210
211
212def index_subs(ind, substitution):
213 """A simple subs function that works both on tuples and strings"""
214 if ind is None:
215 return ind
216 else:
217 return tuple(substitution.get(c, c) for c in ind)
218
219
220_BLOCKWISE_DEFAULT_PREFIX = "__dask_blockwise__"

Callers 3

test_index_subsFunction · 0.90
blockwiseFunction · 0.85
rewrite_blockwiseFunction · 0.85

Calls 1

getMethod · 0.45

Tested by 1

test_index_subsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…