[Numpy-discussion] fwrite() failure in PyArray_ToFile

David Warde-Farley dwf@cs.toronto....
Fri Sep 4 14:36:32 CDT 2009

A friend of mine is trying to save approx 2GB of float32s with  
np.save, and it's been failing. I traced it to PyArray_ToFile in core/ 

Traceback (most recent call last):
   File "preprocessTIMIT.py", line 302, in <module>
   File "preprocessTIMIT.py", line 299, in main
     num.save("/ais/gobi1/gdahl/speech/%s" % k, d[k])
   File "/nobackup/murray/bin/pylab-02/x86_64_GenuineIntel_6.06/ 
Python-2.5.4/lib/python2.5/site-packages/numpy/lib/io.py", line 241,  
in save
     format.write_array(fid, arr)
   File "/nobackup/murray/bin/pylab-02/x86_64_GenuineIntel_6.06/ 
Python-2.5.4/lib/python2.5/site-packages/numpy/lib/format.py", line  
322, in write_array
ValueError: 541110272 requested and 2028 written

This is writing to a local ext3 filesystem. Apparently fwrite() is  
giving back values in the low thousands instead of the correct amount.

Has anyone encountered this, or know why it would happen? 	The values  
are 1004 and 2028 that we seem to keep seeing, which as far as I can  
tell are not error codes.



More information about the NumPy-Discussion mailing list