[Numpy-discussion] loadtxt bug?
Alan G Isaac
aisaac at american.edu
Fri Nov 23 23:03:21 EST 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
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`.
More information about the NumPy-Discussion