When using ndarray.squeeze, a view is returned, which means you can do the follow (somewhat-contrived) operation:
a.squeeze()[...] = 2 return a
However, when tried with a masked array, this can fail, breaking liskov subsitution:
MaskError: Cannot alter the masked element.
This fails because squeeze breaks the contract of returning a view, instead deciding sometimes to return masked.
There is a patch that fixes this in gh-9432 https://github.com/numpy/numpy/pull/9432 - however, by necessity it breaks any existing code that uses m_arr.squeeze() is np.ma.masked.
Is this too breaking a change?