| 1329 | return self.format.format(x) |
| 1330 | |
| 1331 | class 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 | |
| 1341 | class ComplexFloatingFormat: |
no outgoing calls
no test coverage detected
searching dependent graphs…