[Numpy-discussion] Inconsistent error messages.
Charles R Harris
charlesr.harris@gmail....
Fri May 22 22:19:26 CDT 2009
Hi All,
Currently fromfile prints a message raises a MemoryError when more items are
requested than read, but fromstring raises a value error:
In [8]: fromstring("", count=10)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/charris/<ipython console> in <module>()
ValueError: string is smaller than requested size
In [9]: fromfile("empty.dat", count=10)
10 items requested but only 0 read
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
/home/charris/<ipython console> in <module>()
MemoryError:
I think fromfile should also raise a ValueError in this case. Thoughts?
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090522/9a32d3b2/attachment.html
More information about the Numpy-discussion
mailing list