numpy.ma.MaskType.ndim

attribute

ma.MaskType.ndim

The number of array dimensions.