()
| 187 | |
| 188 | |
| 189 | def test_constant(): |
| 190 | x = np.arange(64).reshape((8, 8)) |
| 191 | d = da.from_array(x, chunks=(4, 4)) |
| 192 | |
| 193 | e = constant(d, axis=0, depth=2, value=10) |
| 194 | assert e.shape[0] == d.shape[0] + 4 |
| 195 | assert e.shape[1] == d.shape[1] |
| 196 | |
| 197 | assert_eq(e[1, :], np.ones(8, dtype=x.dtype) * 10) |
| 198 | assert_eq(e[-1, :], np.ones(8, dtype=x.dtype) * 10) |
| 199 | |
| 200 | |
| 201 | def test_boundaries(): |