(self, attr, val=None)
| 556 | return fmt % (lst, lf, repr_dtype) |
| 557 | |
| 558 | def field(self, attr, val=None): |
| 559 | if isinstance(attr, int): |
| 560 | names = ndarray.__getattribute__(self, 'dtype').names |
| 561 | attr = names[attr] |
| 562 | |
| 563 | fielddict = ndarray.__getattribute__(self, 'dtype').fields |
| 564 | |
| 565 | res = fielddict[attr][:2] |
| 566 | |
| 567 | if val is None: |
| 568 | obj = self.getfield(*res) |
| 569 | if obj.dtype.names is not None: |
| 570 | return obj |
| 571 | return obj.view(ndarray) |
| 572 | else: |
| 573 | return self.setfield(val, *res) |
| 574 | |
| 575 | |
| 576 | def _deprecate_shape_0_as_None(shape): |
nothing calls this directly
no test coverage detected