2009/5/23 Charles R Harris <[email protected]>: > 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?
I'm also wondering why the MemoryError has an empty message string -- that should be fixed. Instead of throwing errors in these scenarios, we could just return the elements read and raise a warning? This is consistent with most other file APIs I know and allows you to read blocks of data until the data runs out. Regards Stéfan _______________________________________________ Numpy-discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
