MCPcopy Index your code
hub / github.com/pydata/xarray / test_is_null

Method test_is_null

xarray/tests/test_dataarray.py:2522–2528  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2520 assert isinstance(converted_subok.data, NdArraySubclass)
2521
2522 def test_is_null(self) -> None:
2523 x = np.random.default_rng(42).random((5, 6))
2524 x[x < 0] = np.nan
2525 original = DataArray(x, [-np.arange(5), np.arange(6)], ["x", "y"])
2526 expected = DataArray(pd.isnull(x), [-np.arange(5), np.arange(6)], ["x", "y"])
2527 assert_identical(expected, original.isnull())
2528 assert_identical(~expected, original.notnull())
2529
2530 def test_math(self) -> None:
2531 x = self.x

Callers

nothing calls this directly

Calls 5

DataArrayClass · 0.90
assert_identicalFunction · 0.90
arangeMethod · 0.80
isnullMethod · 0.45
notnullMethod · 0.45

Tested by

no test coverage detected