numpy/numpy — pull request #4586 by mhvk (2014-04-04 21:52:11+00:00)
Title: ENH: Let MaskedArray getter, setter respect baseclass overrides

As is, `MaskedArray` uses explicity calls to `ndarray.__setitem__(self.data, indx, value)` and `ndarray.__getitem__(self.data, indx)` to access elements of its baseclass. This PR uses `self.data[indx]` instead, so that possible overrides of `__getitem__` and `__setitem__` are respected.

This is particularly useful for astropy's `Quantity` ndarray subclass, since it should check that anything written to it has the correct unit, and associate units for anything gotten from it.

(Note: this includes #4585, as otherwise some of the tests would fail; I'll rebase once that is in.)