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

Method _overwrite_indexes

xarray/core/coordinates.py:709–718  ·  view source on GitHub ↗
(
        self,
        indexes: Mapping[Any, Index],
        variables: Mapping[Any, Variable] | None = None,
    )

Source from the content-addressed store, hash-verified

707 return new_coords
708
709 def _overwrite_indexes(
710 self,
711 indexes: Mapping[Any, Index],
712 variables: Mapping[Any, Variable] | None = None,
713 ) -> Self:
714 results = self.to_dataset()._overwrite_indexes(indexes, variables)
715
716 # TODO: remove cast once we get rid of DatasetCoordinates
717 # and DataArrayCoordinates (i.e., Dataset and DataArray encapsulate Coordinates)
718 return cast(Self, results.coords)
719
720 def _reindex_callback(
721 self,

Callers

nothing calls this directly

Calls 1

to_datasetMethod · 0.95

Tested by

no test coverage detected