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

Method __init__

numpy/core/arrayprint.py:1236–1239  ·  view source on GitHub ↗
(self, data, **kwargs)

Source from the content-addressed store, hash-verified

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"

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected