SciPy

numpy.ma.MaskType.size

attribute

MaskType.size

number of elements in the gentype