Pretty-print all fields.
(self)
| 289 | return obj |
| 290 | |
| 291 | def pprint(self): |
| 292 | """Pretty-print all fields.""" |
| 293 | # pretty-print all fields |
| 294 | names = self.dtype.names |
| 295 | maxlen = max(len(name) for name in names) |
| 296 | fmt = '%% %ds: %%s' % maxlen |
| 297 | rows = [fmt % (name, getattr(self, name)) for name in names] |
| 298 | return "\n".join(rows) |
| 299 | |
| 300 | # The recarray is almost identical to a standard array (which supports |
| 301 | # named fields already) The biggest difference is that it can use |
no test coverage detected