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

Class IntegerFormat

numpy/core/arrayprint.py:1222–1232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1220
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
1233
1234
1235class BoolFormat:

Callers 1

_get_formatdictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected