[SciPy-user] Writing a Numpy array to an ascii file with column headings
nauss at lcrs.de
Sun Dec 3 08:51:25 CST 2006
I am a really newby to Python but I hope this is the right place to get
an answer for my question: I want to write data from an n-D array to an
ASCII file but with column headings.
I have no problem to store array data in an ASCII file using e. g.:
from numpy import *
from scipy.io import write_array
data = column_stack((array_1D_1,array_1D_2))
write_array("test.txt", data, separator=' ', linesep='\n', precision=7)
As you all know better than myself, this results in something like:
But for my purpose, the ASCII file should look like:
with e. g. "SSA" and "Reflection" as column headings.
Thank you in advance for your comments,
More information about the SciPy-user