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

Method test_get_index_size_zero

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

Source from the content-addressed store, hash-verified

198 array.get_index("z")
199
200 def test_get_index_size_zero(self) -> None:
201 array = DataArray(np.zeros((0,)), dims=["x"])
202 actual = array.get_index("x")
203 expected = pd.Index([], dtype=np.int64)
204 assert actual.equals(expected)
205 assert actual.dtype == expected.dtype
206
207 def test_struct_array_dims(self) -> None:
208 """

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
get_indexMethod · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected