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

Class InaccessibleArray

xarray/tests/arrays.py:18–33  ·  view source on GitHub ↗

Disallows any loading.

Source from the content-addressed store, hash-verified

16
17
18class InaccessibleArray(utils.NDArrayMixin, ExplicitlyIndexed):
19 """Disallows any loading."""
20
21 def __init__(self, array):
22 self.array = array
23
24 def get_duck_array(self):
25 raise UnexpectedDataAccess("Tried accessing data")
26
27 def __array__(
28 self, dtype: np.typing.DTypeLike | None = None, /, *, copy: bool | None = None
29 ) -> np.ndarray:
30 raise UnexpectedDataAccess("Tried accessing data")
31
32 def __getitem__(self, key):
33 raise UnexpectedDataAccess("Tried accessing data.")
34
35
36class FirstElementAccessibleArray(InaccessibleArray):

Callers 6

lazy_inaccessibleMethod · 0.90
test_renameMethod · 0.90
test_concat_lazyMethod · 0.90

Calls

no outgoing calls

Tested by 6

lazy_inaccessibleMethod · 0.72
test_renameMethod · 0.72
test_concat_lazyMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…