MCPcopy Create free account
hub / github.com/numpy/numpy / __getitem__

Method __getitem__

numpy/core/tests/test_ufunc.py:1945–1952  ·  view source on GitHub ↗
(self, i)

Source from the content-addressed store, hash-verified

1943 return self.shape[0]
1944
1945 def __getitem__(self, i):
1946 MyThing.getitem_count += 1
1947 if not isinstance(i, tuple):
1948 i = (i,)
1949 if len(i) > self.ndim:
1950 raise IndexError("boo")
1951
1952 return MyThing(self.shape[len(i):])
1953
1954 def __rmul__(self, other):
1955 MyThing.rmul_count += 1

Callers

nothing calls this directly

Calls 1

MyThingClass · 0.85

Tested by

no test coverage detected