(func)
| 84 | |
| 85 | @pytest.mark.parametrize("func", functions) |
| 86 | def test_basic(func): |
| 87 | x = da.random.default_rng().random((2, 3, 4), chunks=(1, 2, 2)) |
| 88 | x[x < 0.4] = 0 |
| 89 | |
| 90 | y = da.ma.masked_equal(x, 0) |
| 91 | |
| 92 | xx = func(x) |
| 93 | yy = func(y) |
| 94 | |
| 95 | assert_eq(xx, da.ma.filled(yy, 0)) |
| 96 | |
| 97 | if yy.shape: |
| 98 | zz = yy.compute() |
| 99 | assert isinstance(zz, np.ma.masked_array) |
| 100 | |
| 101 | |
| 102 | def test_tensordot(): |