NumPY: Reading/Writing Arrays To/From Files

Grant Griffin not.this at
Wed Mar 28 16:21:49 CEST 2001

Ben Held wrote:
> I would like to be able to read/write NumPY array objects to/from ascii
> files.  I could not find support for this in the NumPY code.  Any ideas?
> Ben

I forget exactly, but I think there's something out there called
"arrayio".  Look for Travis Oliphant's page: I think you can find it

Alternatively, you can do what I did once, which is to code it up
yourself using a Python list, then convert the list into a NumPy array. 
(This is probably slower than arrayio, but it works.)

necessity-is-the-mother-of-invention-ly y'rs,


Grant R. Griffin                                       g2 at
Publisher of dspGuru                 
Iowegian International Corporation  

More information about the Python-list mailing list