(self)
| 4180 | array2.to_dataset("x") |
| 4181 | |
| 4182 | def test__title_for_slice(self) -> None: |
| 4183 | array = DataArray( |
| 4184 | np.ones((4, 3, 2)), |
| 4185 | dims=["a", "b", "c"], |
| 4186 | coords={"a": range(4), "b": range(3), "c": range(2)}, |
| 4187 | ) |
| 4188 | assert "" == array._title_for_slice() |
| 4189 | assert "c = 0" == array.isel(c=0)._title_for_slice() |
| 4190 | title = array.isel(b=1, c=0)._title_for_slice() |
| 4191 | assert title in {"b = 1, c = 0", "c = 0, b = 1"} |
| 4192 | |
| 4193 | a2 = DataArray(np.ones((4, 1)), dims=["a", "b"]) |
| 4194 | assert "" == a2._title_for_slice() |
| 4195 | |
| 4196 | def test__title_for_slice_truncate(self) -> None: |
| 4197 | array = DataArray(np.ones(4)) |
nothing calls this directly
no test coverage detected