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