()
| 220 | |
| 221 | |
| 222 | def test_filled(): |
| 223 | x = np.array([-2, -1, 0, 1, 2] * 20).reshape((10, 10)) |
| 224 | dx = da.from_array(x, chunks=5) |
| 225 | |
| 226 | mx = np.ma.masked_equal(x, 0) |
| 227 | mdx = da.ma.masked_equal(dx, 0) |
| 228 | |
| 229 | assert_eq(da.ma.filled(mdx), np.ma.filled(mx)) |
| 230 | assert_eq(da.ma.filled(mdx, -5), np.ma.filled(mx, -5)) |
| 231 | |
| 232 | |
| 233 | def assert_eq_ma(a, b): |