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

Method __init__

numpy/core/arrayprint.py:1223–1229  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

1221
1222class IntegerFormat:
1223 def __init__(self, data):
1224 if data.size > 0:
1225 max_str_len = max(len(str(np.max(data))),
1226 len(str(np.min(data))))
1227 else:
1228 max_str_len = 0
1229 self.format = '%{}d'.format(max_str_len)
1230
1231 def __call__(self, x):
1232 return self.format % x

Callers

nothing calls this directly

Calls 3

maxFunction · 0.70
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected