xdas.coordinates.Coordinates.to_index#
- Coordinates.to_index(item, method=None, endpoint=True)[source]#
Convert an item selector to a dict of per-dimension integer indices.
- Parameters:
item (indexer-like, sequence, or mapping) – Passed to
get_query()to resolve dimension-by-dimension indexers.method (str, optional) – Interpolation method forwarded to each coordinate’s
to_index().endpoint (bool, optional) – Whether to include the stop endpoint of slice selectors. Default
True.
- Returns:
Mapping from dimension name to integer index or slice.
- Return type: