Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ __len__
Method
__len__
numpy/core/tests/test_protocols.py:14–15 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
12
self.array = array
13
14
def
__len__(self):
15
return
len(self.array)
16
17
def
__getitem__(self, item):
18
return
type(self)(self.array[item])
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected