Skip to content

Commit 9dc845a

Browse files
committed
remove the apparently-unused _drop_indexed_coords method
1 parent fdae5bc commit 9dc845a

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

xarray/core/coordinates.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -772,14 +772,6 @@ def _drop_coords(self, coord_names):
772772
del self._data._indexes[name]
773773
self._data._coord_names.difference_update(coord_names)
774774

775-
def _drop_indexed_coords(self, coords_to_drop: set[Hashable]) -> None:
776-
assert self._data.xindexes is not None
777-
new_coords = drop_indexed_coords(coords_to_drop, self)
778-
for name in self._data._coord_names - new_coords._names:
779-
del self._data._variables[name]
780-
self._data._indexes = dict(new_coords.xindexes)
781-
self._data._coord_names.intersection_update(new_coords._names)
782-
783775
def __delitem__(self, key: Hashable) -> None:
784776
if key in self:
785777
del self._data[key]
@@ -889,13 +881,6 @@ def _drop_coords(self, coord_names):
889881
del self._data._node_coord_variables[name]
890882
del self._data._node_indexes[name]
891883

892-
def _drop_indexed_coords(self, coords_to_drop: set[Hashable]) -> None:
893-
assert self._data.xindexes is not None
894-
new_coords = drop_indexed_coords(coords_to_drop, self)
895-
for name in self._data._node_coord_variables - new_coords._names:
896-
del self._data._node_coord_variables[name]
897-
self._data._node_indexes = dict(new_coords.xindexes)
898-
899884
def __delitem__(self, key: Hashable) -> None:
900885
if key in self:
901886
del self._data[key] # type: ignore[arg-type] # see https://github.com/pydata/xarray/issues/8836

0 commit comments

Comments
 (0)