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

Function test_optimize

dask/array/tests/test_array_core.py:2756–2762  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2754
2755
2756def test_optimize():
2757 x = np.arange(5).astype("f4")
2758 a = da.from_array(x, chunks=(2,))
2759 expr = a[1:4] + 1
2760 result = optimize(expr.dask, expr.__dask_keys__())
2761 assert isinstance(result, dict)
2762 assert all(key in result for key in expr.__dask_keys__())
2763
2764
2765def test_slicing_with_non_ndarrays():

Callers

nothing calls this directly

Calls 5

optimizeFunction · 0.90
allFunction · 0.85
astypeMethod · 0.45
arangeMethod · 0.45
__dask_keys__Method · 0.45

Tested by

no test coverage detected