[Numpy-discussion] loadtxt stop

Zachary Pincus zachary.pincus@yale....
Fri Sep 17 15:04:25 CDT 2010

On Sep 17, 2010, at 3:59 PM, Benjamin Root wrote:

> So, this code will still raise an error for an empty file.   
> Personally, I consider that a bug because I would expect to receive  
> an empty array.  I could understand raising an error for a non-empty  
> file that does not contain anything useful.  For comparison, Matlab  
> returns an empty matrix for loading an emtpy text file.
> This has been a long-standing annoyance for me, along with the  
> behavior with a single-line data file.

Agreed... I just wanted to make the patch as identical in behavior to  
the old version as possible. Though again, simple shims around loadtxt  
(as in my previous examples) can yield the desired behavior easily  

More information about the NumPy-Discussion mailing list