MCPcopy
hub / github.com/dask/dask / func

Function func

dask/array/tests/test_array_core.py:1586–1587  ·  view source on GitHub ↗
(block, block_id=None, c=0)

Source from the content-addressed store, hash-verified

1584 d = from_array(x, chunks=(2,))
1585
1586 def func(block, block_id=None, c=0):
1587 return np.ones_like(block) * sum(block_id) + c
1588
1589 out = d.map_blocks(func, dtype="i8")
1590 expected = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4], dtype="i8")

Callers 3

test_coerceFunction · 0.70
test_normalize_chunksFunction · 0.70

Calls 8

sumFunction · 0.50
keysMethod · 0.45
dtypeMethod · 0.45
onesMethod · 0.45
sumMethod · 0.45
arangeMethod · 0.45
zerosMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…