NumPy

numpy.ma.MaskType.nbytes

attribute

MaskType.nbytes

The length of the scalar in bytes.