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

Function _check_bounds

xarray/core/indexing.py:1475–1478  ·  view source on GitHub ↗

Check if the given indices are all within the array boundaries.

(indices: Any, size: int)

Source from the content-addressed store, hash-verified

1473
1474
1475def _check_bounds(indices: Any, size: int):
1476 """Check if the given indices are all within the array boundaries."""
1477 if np.any((indices < 0) | (indices >= size)):
1478 raise IndexError("out of bounds index")
1479
1480
1481def _arrayize_outer_indexer(indexer: OuterIndexer, shape) -> OuterIndexer:

Callers 2

_arrayize_outer_indexerFunction · 0.85
_vindex_getMethod · 0.85

Calls 1

anyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…