(self, indx)
| 2647 | return self |
| 2648 | |
| 2649 | def __getitem__(self, indx): |
| 2650 | result = self.dataiter.__getitem__(indx).view(type(self.ma)) |
| 2651 | if self.maskiter is not None: |
| 2652 | _mask = self.maskiter.__getitem__(indx) |
| 2653 | if isinstance(_mask, ndarray): |
| 2654 | # set shape to match that of data; this is needed for matrices |
| 2655 | _mask.shape = result.shape |
| 2656 | result._mask = _mask |
| 2657 | elif isinstance(_mask, np.void): |
| 2658 | return mvoid(result, mask=_mask, hardmask=self.ma._hardmask) |
| 2659 | elif _mask: # Just a scalar, masked |
| 2660 | return masked |
| 2661 | return result |
| 2662 | |
| 2663 | # This won't work if ravel makes a copy |
| 2664 | def __setitem__(self, index, value): |
nothing calls this directly
no test coverage detected