summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-05-08 16:34:39 +0000
committerPauli Virtanen <pav@iki.fi>2010-05-08 16:34:39 +0000
commit75f99ab7dcc846c58a088a9233fb9af28aef0b4a (patch)
tree082c47c38283f44e502e4daf4cc022cfce8a4cc7 /numpy/lib/npyio.py
parent8a6767f5ad921d49f6d69e0ee2da39ba9209020c (diff)
downloadnumpy-75f99ab7dcc846c58a088a9233fb9af28aef0b4a.tar.gz
BUG: lib: make loadtxt work on Py3 when fh returns unicode (fixes #1479)
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: