()
| 3792 | |
| 3793 | |
| 3794 | def test_to_delayed(): |
| 3795 | x = da.random.default_rng().random((4, 4), chunks=(2, 2)) |
| 3796 | y = x + 10 |
| 3797 | |
| 3798 | [[a, b], [c, d]] = y.to_delayed() |
| 3799 | assert_eq(a.compute(), y[:2, :2]) |
| 3800 | |
| 3801 | s = 2 |
| 3802 | x = da.from_array(np.array(s), chunks=0) |
| 3803 | a = x.to_delayed()[tuple()] |
| 3804 | assert a.compute() == s |
| 3805 | |
| 3806 | |
| 3807 | def test_to_delayed_optimize_graph(): |
nothing calls this directly
no test coverage detected