MCPcopy Index your code
hub / github.com/numpy/numpy / BoolFormat

Class BoolFormat

numpy/_core/arrayprint.py:1331–1338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1329 return self.format.format(x)
1330
1331class BoolFormat:
1332 def __init__(self, data, **kwargs):
1333 # add an extra space so " True" and "False" have the same length and
1334 # array elements align nicely when printed, except in 0d arrays
1335 self.truestr = ' True' if data.shape != () else 'True'
1336
1337 def __call__(self, x):
1338 return self.truestr if x else "False"
1339
1340
1341class ComplexFloatingFormat:

Callers 1

_get_formatdictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…