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
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to