MCPcopy Create free account
hub / github.com/dask/dask / test_fuse_slices_with_alias

Function test_fuse_slices_with_alias

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

Source from the content-addressed store, hash-verified

124
125
126def test_fuse_slices_with_alias():
127 dsk = {
128 "x": np.arange(16).reshape((4, 4)),
129 ("dx", 0, 0): (getter, "x", (slice(0, 4), slice(0, 4))),
130 ("alias", 0, 0): ("dx", 0, 0),
131 ("dx2", 0): (getitem, ("alias", 0, 0), (slice(None), 0)),
132 }
133 keys = [("dx2", 0)]
134 dsk2 = optimize(dsk, keys)
135 assert len(dsk2) == 2
136
137
138@pytest.mark.parametrize("chunks", [10, 5, 3])

Callers

nothing calls this directly

Calls 3

optimizeFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45

Tested by

no test coverage detected