Pretty-print all fields.
(self)
| 259 | return obj |
| 260 | |
| 261 | def pprint(self): |
| 262 | """Pretty-print all fields.""" |
| 263 | # pretty-print all fields |
| 264 | names = self.dtype.names |
| 265 | maxlen = max(len(name) for name in names) |
| 266 | rows = [f"{name:>{maxlen}}: {getattr(self, name)}" for name in names] |
| 267 | return "\n".join(rows) |
| 268 | |
| 269 | # The recarray is almost identical to a standard array (which supports |
| 270 | # named fields already) The biggest difference is that it can use |
no test coverage detected