NumPy
ma.MaskType.tofile
method
Scalar method identical to the corresponding array attribute.
Please see ndarray.tofile.
ndarray.tofile