()
| 355 | |
| 356 | |
| 357 | def test_set_fill_value(): |
| 358 | x = np.random.default_rng().integers(0, 10, (10, 10)) |
| 359 | dx = da.from_array(x, chunks=(3, 4)) |
| 360 | mx = np.ma.masked_greater(x, 3) |
| 361 | dmx = da.ma.masked_greater(dx, 3) |
| 362 | |
| 363 | da.ma.set_fill_value(dmx, -10) |
| 364 | np.ma.set_fill_value(mx, -10) |
| 365 | assert_eq_ma(dmx, mx) |
| 366 | |
| 367 | da.ma.set_fill_value(dx, -10) |
| 368 | np.ma.set_fill_value(x, -10) |
| 369 | assert_eq_ma(dx, x) |
| 370 | |
| 371 | with pytest.raises(TypeError): |
| 372 | da.ma.set_fill_value(dmx, 1e20) |
| 373 | |
| 374 | with pytest.raises(ValueError): |
| 375 | da.ma.set_fill_value(dmx, dx) |
| 376 | |
| 377 | |
| 378 | @pytest.mark.parametrize("keepdims", [False, True]) |
nothing calls this directly
no test coverage detected