MCPcopy Create free account
hub / github.com/dask/dask / assert_eq_ma

Function assert_eq_ma

dask/array/tests/test_masked.py:233–243  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

231
232
233def assert_eq_ma(a, b):
234 res = a.compute()
235 if res is np.ma.masked:
236 assert res is b
237 else:
238 assert type(res) == type(b)
239 if hasattr(res, "mask"):
240 np.testing.assert_equal(res.mask, b.mask)
241 a = da.ma.filled(a)
242 b = np.ma.filled(b)
243 assert_eq(a, b, equal_nan=True)
244
245
246@pytest.mark.parametrize("dtype", ("i8", "f8"))

Callers 5

test_reductionsFunction · 0.85
test_arg_reductionsFunction · 0.85
test_cumulativeFunction · 0.85
test_set_fill_valueFunction · 0.85

Calls 2

assert_eqFunction · 0.90
computeMethod · 0.45

Tested by

no test coverage detected