MCPcopy 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

itemMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected