[Numpy-discussion] loadtxt bug?
Alan G Isaac
aisaac@american....
Fri Nov 23 22:03:21 CST 2007
> On Fri, Nov 23, 2007 at 07:58:13AM -0500, Alan G Isaac wrote:
>> Specifically, is it not the case that the last line of
>> a text file is not guaranteed to have a terminator? Does
>> this not raise the possibility that a digit will be
>> clipped from the last line?
On Fri, 23 Nov 2007, Gael Varoquaux apparently wrote:
> Yes. If the line does not end by a terminator you have a problem.
I do not know how common this situation is, but:
- it is common enough that some editors address it
explicitly (e.g., Vim, Epsilon)
- Java's TextReader addresses it explicitly
<URL:http://www.cs.arizona.edu/~reges/teachers/TextReader.html>
Based on these considerations an unterminated final line
looks like a possibility. If so, perhaps that should be
addressed by changing that line I pointed out in `loadtxt`.
Cheers,
Alan Isaac
More information about the Numpy-discussion
mailing list