(self)
| 1057 | self.validate_array_type(actual) |
| 1058 | |
| 1059 | def test_dropna(self) -> None: |
| 1060 | # regression test for GH:issue:1694 |
| 1061 | a = np.random.randn(4, 3) |
| 1062 | a[1, 1] = np.nan |
| 1063 | in_memory = xr.Dataset( |
| 1064 | {"a": (("y", "x"), a)}, coords={"y": np.arange(4), "x": np.arange(3)} |
| 1065 | ) |
| 1066 | |
| 1067 | assert_identical( |
| 1068 | in_memory.dropna(dim="x"), in_memory.isel(x=slice(None, None, 2)) |
| 1069 | ) |
| 1070 | |
| 1071 | with self.roundtrip(in_memory) as on_disk: |
| 1072 | self.validate_array_type(on_disk) |
| 1073 | expected = in_memory.dropna(dim="x") |
| 1074 | actual = on_disk.dropna(dim="x") |
| 1075 | assert_identical(expected, actual) |
| 1076 | |
| 1077 | def test_ondisk_after_print(self) -> None: |
| 1078 | """Make sure print does not load file into memory""" |
nothing calls this directly
no test coverage detected