Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ to_string
Method
to_string
numpy/core/tests/test_arrayprint.py:109–110 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
107
return
result
108
109
def
to_string(self):
110
return
{0:
'zero'
, 1:
'one'
, 2:
'two'
}.get(self.item(),
'many'
)
111
112
def
__str__(self):
113
if
self.shape == ():
Callers
1
__str__
Method · 0.95
Calls
2
item
Method · 0.80
get
Method · 0.45
Tested by
no test coverage detected