MCPcopy
hub / github.com/dask/dask / test_dont_fuse_numpy_arrays

Function test_dont_fuse_numpy_arrays

dask/array/tests/test_optimization.py:111–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109
110
111def test_dont_fuse_numpy_arrays():
112 x = np.ones(10)
113 for _ in [(5,), (10,)]:
114 y = da.from_array(x, chunks=(10,))
115
116 dsk = y.__dask_optimize__(y.dask, y.__dask_keys__())
117 assert (
118 sum(
119 isinstance(v, DataNode) and isinstance(v.value, np.ndarray)
120 for v in dsk.values()
121 )
122 == 1
123 )
124
125
126def test_fuse_slices_with_alias():

Callers

nothing calls this directly

Calls 5

__dask_optimize__Method · 0.80
sumFunction · 0.50
onesMethod · 0.45
__dask_keys__Method · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…