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

Class BoolFormat

numpy/core/arrayprint.py:1235–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1233
1234
1235class BoolFormat:
1236 def __init__(self, data, **kwargs):
1237 # add an extra space so " True" and "False" have the same length and
1238 # array elements align nicely when printed, except in 0d arrays
1239 self.truestr = ' True' if data.shape != () else 'True'
1240
1241 def __call__(self, x):
1242 return self.truestr if x else "False"
1243
1244
1245class ComplexFloatingFormat:

Callers 1

_get_formatdictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected