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

Method _reindex_callback

xarray/core/coordinates.py:720–743  ·  view source on GitHub ↗

Callback called from ``Aligner`` to create a new reindexed Coordinate.

(
        self,
        aligner: Aligner,
        dim_pos_indexers: dict[Hashable, Any],
        variables: dict[Hashable, Variable],
        indexes: dict[Hashable, Index],
        fill_value: Any,
        exclude_dims: frozenset[Hashable],
        exclude_vars: frozenset[Hashable],
    )

Source from the content-addressed store, hash-verified

718 return cast(Self, results.coords)
719
720 def _reindex_callback(
721 self,
722 aligner: Aligner,
723 dim_pos_indexers: dict[Hashable, Any],
724 variables: dict[Hashable, Variable],
725 indexes: dict[Hashable, Index],
726 fill_value: Any,
727 exclude_dims: frozenset[Hashable],
728 exclude_vars: frozenset[Hashable],
729 ) -> Self:
730 """Callback called from ``Aligner`` to create a new reindexed Coordinate."""
731 aligned = self.to_dataset()._reindex_callback(
732 aligner,
733 dim_pos_indexers,
734 variables,
735 indexes,
736 fill_value,
737 exclude_dims,
738 exclude_vars,
739 )
740
741 # TODO: remove cast once we get rid of DatasetCoordinates
742 # and DataArrayCoordinates (i.e., Dataset and DataArray encapsulate Coordinates)
743 return cast(Self, aligned.coords)
744
745 def _ipython_key_completions_(self):
746 """Provide method for the key-autocompletions in IPython."""

Callers

nothing calls this directly

Calls 1

to_datasetMethod · 0.95

Tested by

no test coverage detected