()
| 404 | |
| 405 | |
| 406 | def 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 | |
| 420 | def test_optimize_blockwise_control_annotations(): |