def test():
    x = np.array([(1, 1.0), (2, 2.0)], dtype=[('a', int), ('b', float)])
m = x.view(ma.MaskedArray)
m.squeeze()

def main():
    test()
main()
UserWarning: converting a masked element to nan