[Numpy-discussion] loadtxt bug?
gael.varoquaux at normalesup.org
Fri Nov 23 02:14:19 EST 2007
On Thu, Nov 22, 2007 at 11:14:07PM -0500, Alan G Isaac wrote:
> In numpy.core.numeric.py you will find loadtxt, which uses
> the following::
> line = line[:line.find(comments)].strip()
> I believe there is a bug here (when a line has no comment).
> To illustrate::
> >>> line = "12345"
> >>> comments = "#"
> >>> line[:line.find(comments)]
Unless you are sure that line always ends with a "\n". This is the case
in the code you are refering too. Unless I am missing some thing.
More information about the NumPy-Discussion