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

Method from_variables

xarray/core/indexes.py:67–96  ·  view source on GitHub ↗

Create a new index object from one or more coordinate variables. This factory method must be implemented in all subclasses of Index. The coordinate variables may be passed here in an arbitrary number and order and each with arbitrary dimensions. It is the responsibility of

(
        cls,
        variables: Mapping[Any, Variable],
        *,
        options: Mapping[str, Any],
    )

Source from the content-addressed store, hash-verified

65
66 @classmethod
67 def from_variables(
68 cls,
69 variables: Mapping[Any, Variable],
70 *,
71 options: Mapping[str, Any],
72 ) -> Self:
73 """Create a new index object from one or more coordinate variables.
74
75 This factory method must be implemented in all subclasses of Index.
76
77 The coordinate variables may be passed here in an arbitrary number and
78 order and each with arbitrary dimensions. It is the responsibility of
79 the index to check the consistency and validity of these coordinates.
80
81 Parameters
82 ----------
83 variables : dict-like
84 Mapping of :py:class:`Variable` objects holding the coordinate labels
85 to index.
86 options : dict-like
87 Keyword arguments passed to this constructor. Propagated from
88 the ``**options`` argument of :py:meth:`xarray.DataArray.set_xindex`
89 or :py:meth:`xarray.Dataset.set_xindex`.
90
91 Returns
92 -------
93 index : Index
94 A new Index object.
95 """
96 raise NotImplementedError()
97
98 @classmethod
99 def concat(

Callers 5

set_indexMethod · 0.45
set_xindexMethod · 0.45
padMethod · 0.45
group_indexers_by_indexFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected