summaryrefslogtreecommitdiff
path: root/numpy/lib/_iotools.py
diff options
context:
space:
mode:
authorAllan Haldane <allan.haldane@gmail.com>2018-05-30 14:44:39 -0400
committerAllan Haldane <allan.haldane@gmail.com>2018-05-30 17:43:51 -0400
commit0c4ebf1cd396f3cfa1e218b2a0e46f1bc84f9614 (patch)
tree34a44fbc26b2725386ab2cc57641114a69fae4a6 /numpy/lib/_iotools.py
parent6721890e86291b53fb8dcbee6809891c348ae98e (diff)
downloadnumpy-0c4ebf1cd396f3cfa1e218b2a0e46f1bc84f9614.tar.gz
BUG: delimiter/comments in genfromtxt should be encoded
Fixes #11028
Diffstat (limited to 'numpy/lib/_iotools.py')
-rw-r--r--numpy/lib/_iotools.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py
index 27143e5c6..b604b8c52 100644
--- a/numpy/lib/_iotools.py
+++ b/numpy/lib/_iotools.py
@@ -205,7 +205,11 @@ class LineSplitter(object):
#
def __init__(self, delimiter=None, comments='#', autostrip=True, encoding=None):
+ delimiter = _decode_line(delimiter)
+ comments = _decode_line(comments)
+
self.comments = comments
+
# Delimiter is a character
if (delimiter is None) or isinstance(delimiter, basestring):
delimiter = delimiter or None