MCPcopy Index your code
hub / github.com/pydata/xarray / FirstElementAccessibleArray

Class FirstElementAccessibleArray

xarray/tests/arrays.py:36–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35
36class FirstElementAccessibleArray(InaccessibleArray):
37 def __getitem__(self, key):
38 tuple_idxr = key.tuple
39 if len(tuple_idxr) > 1:
40 raise UnexpectedDataAccess("Tried accessing more than one element.")
41 return self.array[tuple_idxr]
42
43
44class IndexableArray(InaccessibleArray):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…