NumPy · Function
np.savetxt
numpy.savetxt writes a one- or two-dimensional array to a text file. It supports custom formats, separators, headers, footers, comments, encoding, and automatic gzip output.
Last updated
Syntax
numpy.savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', footer='', comments='# ', encoding=None)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
numpy.loadtxtnumpy.savenumpy.saveznumpy.savez_compressednumpy.genfromtxtnumpy.ndarray.tofile