[Numpy-discussion] Savetxt usage question

Michael S. Gilbert michael.s.gilbert at gmail.com
Sun May 17 19:57:37 EDT 2009


fid = open( 'file' , 'w' )
fid.write( 'header\n' )
savetxt( fid , data )
fid.close()

On Sun, 17 May 2009 18:54:33 -0500 Gökhan SEVER wrote:

> Hello,
> 
> Is there a way to write a header information to a text file using savetxt
> command besides dumping arrays in the same file?
> 
> In little detailed fashion: I have to write a few long column of arrays into
> a text file. While doing that I need to put some information regarding to
> the context of the file. Like variable names, project date, missing value
> equivalent etc...
> 
> So far, I couldn't see that this could be achieved with one savetxt command.
> However there might be an easy point that I am missing.
> 
> Thank you.
> 
> Gökhan
> 



More information about the NumPy-Discussion mailing list