Get the index.
(self, indx)
| 6573 | return super()._data[()] |
| 6574 | |
| 6575 | def __getitem__(self, indx): |
| 6576 | """ |
| 6577 | Get the index. |
| 6578 | |
| 6579 | """ |
| 6580 | m = self._mask |
| 6581 | if isinstance(m[indx], ndarray): |
| 6582 | # Can happen when indx is a multi-dimensional field: |
| 6583 | # A = ma.masked_array(data=[([0,1],)], mask=[([True, |
| 6584 | # False],)], dtype=[("A", ">i2", (2,))]) |
| 6585 | # x = A[0]; y = x["A"]; then y.mask["A"].size==2 |
| 6586 | # and we can not say masked/unmasked. |
| 6587 | # The result is no longer mvoid! |
| 6588 | # See also issue #6724. |
| 6589 | return masked_array( |
| 6590 | data=self._data[indx], mask=m[indx], |
| 6591 | fill_value=self._fill_value[indx], |
| 6592 | hard_mask=self._hardmask) |
| 6593 | if m is not nomask and m[indx]: |
| 6594 | return masked |
| 6595 | return self._data[indx] |
| 6596 | |
| 6597 | def __setitem__(self, indx, value): |
| 6598 | self._data[indx] = value |
no outgoing calls
no test coverage detected