(chunks)
| 137 | |
| 138 | @pytest.mark.parametrize("chunks", [10, 5, 3]) |
| 139 | def test_fuse_getter_with_asarray(chunks): |
| 140 | x = np.ones(10) * 1234567890 |
| 141 | y = da.ones(10, chunks=chunks) |
| 142 | z = x + y |
| 143 | dsk = z.__dask_optimize__(z.dask, z.__dask_keys__()) |
| 144 | if chunks == 10: |
| 145 | assert len(dsk) == 2 and any(isinstance(t, Alias) for t in dsk.values()) |
| 146 | else: |
| 147 | assert any( |
| 148 | isinstance(v, DataNode) and isinstance(v.value, np.ndarray) |
| 149 | for v in dsk.values() |
| 150 | ) |
| 151 | assert_eq(z, x + 1) |
| 152 | |
| 153 | |
| 154 | @pytest.mark.xfail(reason="blockwise fusion does not respect this, which is ok") |
nothing calls this directly
no test coverage detected
searching dependent graphs…