[Numpy-discussion] numpy.load raising IOError but EOFError expected

Friedrich Romstedt friedrichromstedt at gmail.com
Thu Jun 24 13:30:07 EDT 2010


2010/6/23 Ruben Salvador <rsalvador.wk at gmail.com>:
> Therefore, is this a bug? Shouldn't EOFError be raised instead of IOError?
> Or am I missunderstanding something? If this is not a bug, how can I detect
> the EOF to stop reading (I expect a way for this to work without tweaking
> the code with saving first in the file the number of dumps done)?

Maybe you can make use of numpy.savez,
http://docs.scipy.org/doc/numpy/reference/generated/numpy.savez.html#numpy-savez
.

Friedrich



More information about the NumPy-Discussion mailing list