Feb. 14, 2011
4:28 p.m.
Hi Robert On Mon, Jan 31, 2011 at 2:39 PM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
It seems to me, that an additional parameter to loadtxt(), say "nrows" or "numrows", would do the job, so that the function does not try reading the entire file. Another possibility would be to raise an exception as it is now, but also to return the data succesfully read so far.
You can always read chunks of the file into StringIO objects, and pass those into loadtxt. I think your request makes sense though, given that a person can already skip lines at the top of the file. Regards Stéfan