NumPy

numpy.ma.MaskType.flat

attribute

MaskType.flat

A 1-D view of the scalar.