MCPcopy Create free account
hub / github.com/pydata/xarray / concat

Method concat

xarray/core/indexes.py:99–129  ·  view source on GitHub ↗

Create a new index by concatenating one or more indexes of the same type. Implementation is optional but required in order to support ``concat``. Otherwise it will raise an error if the index needs to be updated during the operation. Parameters -----

(
        cls,
        indexes: Sequence[Self],
        dim: Hashable,
        positions: Iterable[Iterable[int]] | None = None,
    )

Source from the content-addressed store, hash-verified

97
98 @classmethod
99 def concat(
100 cls,
101 indexes: Sequence[Self],
102 dim: Hashable,
103 positions: Iterable[Iterable[int]] | None = None,
104 ) -> Self:
105 """Create a new index by concatenating one or more indexes of the same
106 type.
107
108 Implementation is optional but required in order to support
109 ``concat``. Otherwise it will raise an error if the index needs to be
110 updated during the operation.
111
112 Parameters
113 ----------
114 indexes : sequence of Index objects
115 Indexes objects to concatenate together. All objects must be of the
116 same type.
117 dim : Hashable
118 Name of the dimension to concatenate along.
119 positions : None or list of integer arrays, optional
120 List of integer arrays which specifies the integer positions to which
121 to assign each dataset along the concatenated dimension. If not
122 supplied, objects are concatenated in the provided order.
123
124 Returns
125 -------
126 index : Index
127 A new Index object.
128 """
129 raise NotImplementedError()
130
131 @classmethod
132 def stack(cls, variables: Mapping[Any, Variable], dim: Hashable) -> Self:

Callers 6

time_concatMethod · 0.45
peakmem_concatMethod · 0.45
to_dask_dataframeMethod · 0.45
concatenateFunction · 0.45
_concat_shortcutMethod · 0.45
_dataset_concatFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected