SciPy

numpy.ma.MaskType.flat

MaskType.flat

a 1-d view of scalar