NumPy

numpy.ma.MaskType.flat

attribute

MaskType.flat

a 1-d view of scalar