MCPcopy
hub / github.com/pydata/xarray / test_range_index_set_xindex

Function test_range_index_set_xindex

xarray/tests/test_range_index.py:91–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89
90
91def test_range_index_set_xindex() -> None:
92 coords = xr.Coordinates({"x": np.arange(0.0, 1.0, 0.1)}, indexes={})
93 ds = xr.Dataset(coords=coords)
94
95 with pytest.raises(
96 NotImplementedError, match=r"cannot create.*RangeIndex.*existing coordinate"
97 ):
98 ds.set_xindex("x", RangeIndex)
99
100
101def test_range_index_isel() -> None:

Callers

nothing calls this directly

Calls 2

set_xindexMethod · 0.95
arangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…