NumPy

numpy.ma.MaskType.tobytes

method

MaskType.tobytes()