Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/numpy/numpy
/ to_string
Method
to_string
numpy/_core/tests/test_arrayprint.py:120–121 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
118
return
result
119
120
def
to_string(self):
121
return
{0:
'zero'
, 1:
'one'
, 2:
'two'
}.get(self.item(),
'many'
)
122
123
def
__str__(self):
124
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