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

Method __len__

numpy/core/tests/test_multiarray.py:1115–1116  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1113 def __getitem__(self, item):
1114 return type(self)(self._data[item])
1115 def __len__(self):
1116 return len(self._data)
1117
1118 # len(d) should give 3, but len(d[0]) will fail
1119 d = A([1,2,3])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected