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

Function test_optimize_blockwise

dask/array/tests/test_atop.py:406–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

404
405
406def test_optimize_blockwise():
407 x = da.ones(10, chunks=(5,))
408 y = (((x + 1) + 2) + 3) + 4
409
410 dsk = da.optimization.optimize_blockwise(y.dask)
411
412 assert isinstance(dsk, HighLevelGraph)
413
414 assert (
415 len([layer for layer in dsk.layers.values() if isinstance(layer, Blockwise)])
416 == 1
417 )
418
419
420def test_optimize_blockwise_control_annotations():

Callers

nothing calls this directly

Calls 2

onesMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected