MCPcopy
hub / github.com/dask/dask / foo

Function foo

dask/array/tests/test_array_core.py:1844–1846  ·  view source on GitHub ↗
(x, *args, **kwargs)

Source from the content-addressed store, hash-verified

1842 dy = da.from_array(y, chunks=5)
1843
1844 def foo(x, *args, **kwargs):
1845 cast = kwargs.pop("cast", "i8")
1846 return (x + sum(args)).astype(cast)
1847
1848 assert_eq(dx.map_blocks(foo, dy, 1), foo(dx, dy, 1))
1849 assert_eq(dx.map_blocks(foo, dy, 1, cast="f8"), foo(dx, dy, 1, cast="f8"))

Callers 1

Calls 3

popMethod · 0.80
sumFunction · 0.50
astypeMethod · 0.45

Tested by

no test coverage detected