diff options
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r-- | numpy/lib/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/io.py b/numpy/lib/io.py index 3d41abeef..b85022203 100644 --- a/numpy/lib/io.py +++ b/numpy/lib/io.py @@ -348,7 +348,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, converters=None, fh = gzip.open(fname) else: fh = file(fname) - elif hasattr(fname, 'seek'): + elif hasattr(fname, 'readline'): fh = fname else: raise ValueError('fname must be a string or file handle') |