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

Function test_optimize

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

Source from the content-addressed store, hash-verified

2751
2752
2753def test_optimize():
2754 x = np.arange(5).astype("f4")
2755 a = da.from_array(x, chunks=(2,))
2756 expr = a[1:4] + 1
2757 result = optimize(expr.dask, expr.__dask_keys__())
2758 assert isinstance(result, dict)
2759 assert all(key in result for key in expr.__dask_keys__())
2760
2761
2762def 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