summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2011-03-29 18:23:07 -0700
committerMatthew Brett <matthew.brett@gmail.com>2011-03-30 10:21:36 -0700
commit354d7a311ef9a6dfd4695147c644ff0294c8c4ee (patch)
tree9eddffe03e85a7076ac43ca8229c42bd8184dc15 /numpy/lib/npyio.py
parenta3889707c684bc3d4f885927c7d4692147be7e86 (diff)
downloadnumpy-354d7a311ef9a6dfd4695147c644ff0294c8c4ee.tar.gz
BUG: open genfromtxt file as binary; add test for filename use
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 9fbacaa22..e73d6fa39 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -1202,7 +1202,7 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
# Initialize the filehandle, the LineSplitter and the NameValidator
own_fhd = False
if isinstance(fname, basestring):
- fhd = np.lib._datasource.open(fname, 'U')
+ fhd = np.lib._datasource.open(fname, 'Ub')
own_fhd = True
elif not hasattr(fname, 'read'):
raise TypeError("The input should be a string or a filehandle. "\