Check that certain array creation routines work with blockwise and can be fused with other blockwise operations.
()
| 182 | |
| 183 | |
| 184 | def test_array_creation_blockwise_fusion(): |
| 185 | """ |
| 186 | Check that certain array creation routines work with blockwise and can be |
| 187 | fused with other blockwise operations. |
| 188 | """ |
| 189 | x = da.ones(3, chunks=(3,)) |
| 190 | y = da.zeros(3, chunks=(3,)) |
| 191 | z = da.full(3, fill_value=2, chunks=(3,)) |
| 192 | a = x + y + z |
| 193 | dsk1 = a.__dask_graph__() |
| 194 | assert len(dsk1) == 5 |
| 195 | dsk2 = optimize_blockwise(dsk1) |
| 196 | assert len(dsk2) == 1 |
| 197 | assert_eq(a, np.full(3, 3.0)) |
| 198 | |
| 199 | |
| 200 | def test_gh3937(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…