[Tutor] writing ascii files with Numeric?
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Sat Jul 3 03:48:04 EDT 2004
On Fri, 2 Jul 2004, Bernard Lebel wrote:
> Just an idea: have you tried...
> filehandle.write( str(Matrix) )
Hi Bernard,
Although this does write the string representation of the matrix to disk,
it's written in a way that might not be so easy to bring back to Numeric
matrix object form. The str() of a value is usually only for human
consumption.
According to:
http://www.pfdubois.com/numpy/html2/numpy-12.html#pgfId-67223
we should be able to use the standard 'pickle' module for saving and
restoring Numeric arrays.
Hope this helps!
More information about the Tutor
mailing list