diff options
author | Matthew Brett <matthew.brett@gmail.com> | 2011-03-29 18:23:07 -0700 |
---|---|---|
committer | Matthew Brett <matthew.brett@gmail.com> | 2011-03-30 10:21:36 -0700 |
commit | 354d7a311ef9a6dfd4695147c644ff0294c8c4ee (patch) | |
tree | 9eddffe03e85a7076ac43ca8229c42bd8184dc15 /numpy/lib/npyio.py | |
parent | a3889707c684bc3d4f885927c7d4692147be7e86 (diff) | |
download | numpy-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.py | 2 |
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. "\ |