Re: [Numpy-discussion] Appending a numpy array to existing text file

2007-11-28 Thread Andy Cheesman
It does indeed work Thanks for the help Andy LB wrote: > If you just want to add your matrix to an existing ascii file, you can > open this file in append mode and give the file handle to > numpy.savetxt : > > f_handle = file('my_file.dat', 'a') > savetxt(f_handle, my_matrix) > f_handle.close()

Re: [Numpy-discussion] Appending a numpy array to existing text file

2007-11-27 Thread LB
If you just want to add your matrix to an existing ascii file, you can open this file in append mode and give the file handle to numpy.savetxt : f_handle = file('my_file.dat', 'a') savetxt(f_handle, my_matrix) f_handle.close() HTH -- LB ___ Numpy-discu

[Numpy-discussion] Appending a numpy array to existing text file

2007-11-27 Thread Andy Cheesman
Hi people, Just a quick question, how do I append a numpy array to an existing ascii output file? I've looked at the numpy.savetxt function and it performs all the formating functions I desire for my output file but it doesn't let me specify how I save my array type Is there a clever work aroun