summaryrefslogtreecommitdiff
path: root/numpy/lib/io.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r--numpy/lib/io.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/io.py b/numpy/lib/io.py
index 07fe5ce6b..521148a5f 100644
--- a/numpy/lib/io.py
+++ b/numpy/lib/io.py
@@ -294,7 +294,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, converters=None,
for i,line in enumerate(fh):
if i<skiprows: continue
comment_start = line.find(comments)
- if comment_start > 0:
+ if comment_start != -1:
line = line[:comment_start].strip()
else:
line = line.strip()