summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index a6e941770..a1c55b23f 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -608,7 +608,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None,
def split_line(line):
"""Chop off comments, strip, and split at delimiter."""
- line = line.split(comments)[0].strip()
+ line = asbytes(line).split(comments)[0].strip()
if line:
return line.split(delimiter)
else: