()
| 149 | |
| 150 | |
| 151 | def test_periodic(): |
| 152 | x = np.arange(64).reshape((8, 8)) |
| 153 | d = da.from_array(x, chunks=(4, 4)) |
| 154 | |
| 155 | e = periodic(d, axis=0, depth=2) |
| 156 | assert e.shape[0] == d.shape[0] + 4 |
| 157 | assert e.shape[1] == d.shape[1] |
| 158 | |
| 159 | assert_eq(e[1, :], d[-1, :]) |
| 160 | assert_eq(e[0, :], d[-2, :]) |
| 161 | |
| 162 | |
| 163 | def test_reflect(): |