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

Function isel_indexes

xarray/core/indexes.py:2207–2218  ·  view source on GitHub ↗
(
    indexes: Indexes[Index],
    indexers: Mapping[Any, Any],
)

Source from the content-addressed store, hash-verified

2205
2206
2207def isel_indexes(
2208 indexes: Indexes[Index],
2209 indexers: Mapping[Any, Any],
2210) -> tuple[dict[Hashable, Index], dict[Hashable, Variable]]:
2211 # Fast path function _apply_indexes_fast does not work with multi-coordinate
2212 # Xarray indexes (see https://github.com/pydata/xarray/issues/10063).
2213 # -> call it only in the most common case where all indexes are default
2214 # PandasIndex each associated to a single 1-dimensional coordinate.
2215 if any(type(idx) is not PandasIndex for idx in indexes._indexes.values()):
2216 return _apply_indexes(indexes, indexers, "isel")
2217 else:
2218 return _apply_indexes_fast(indexes, indexers, "isel")
2219
2220
2221def roll_indexes(

Callers 4

iselMethod · 0.90
_isel_fancyMethod · 0.90
diffMethod · 0.90
iselMethod · 0.90

Calls 4

typeFunction · 0.85
_apply_indexesFunction · 0.85
_apply_indexes_fastFunction · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…