(self, indx)
| 279 | "attribute '%s'" % attr) |
| 280 | |
| 281 | def __getitem__(self, indx): |
| 282 | obj = nt.void.__getitem__(self, indx) |
| 283 | |
| 284 | # copy behavior of record.__getattribute__, |
| 285 | if isinstance(obj, nt.void) and obj.dtype.names is not None: |
| 286 | return obj.view((self.__class__, obj.dtype)) |
| 287 | else: |
| 288 | # return a single element |
| 289 | return obj |
| 290 | |
| 291 | def pprint(self): |
| 292 | """Pretty-print all fields.""" |