(self, attr, val=None)
| 537 | return fmt % (lst, lf, repr_dtype) |
| 538 | |
| 539 | def field(self, attr, val=None): |
| 540 | if isinstance(attr, int): |
| 541 | names = ndarray.__getattribute__(self, 'dtype').names |
| 542 | attr = names[attr] |
| 543 | |
| 544 | fielddict = ndarray.__getattribute__(self, 'dtype').fields |
| 545 | |
| 546 | res = fielddict[attr][:2] |
| 547 | |
| 548 | if val is None: |
| 549 | obj = self.getfield(*res) |
| 550 | if obj.dtype.names is not None: |
| 551 | return obj |
| 552 | return obj.view(ndarray) |
| 553 | else: |
| 554 | return self.setfield(val, *res) |
| 555 | |
| 556 | |
| 557 | def _deprecate_shape_0_as_None(shape): |
nothing calls this directly
no test coverage detected