diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2009-03-02 20:05:32 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2009-03-02 20:05:32 +0000 |
commit | 553a30079c37ebecf8a37b9ee1fbf219d1d09053 (patch) | |
tree | 2da9d45c313a0b00c44e0122e6ff5e9af3edfe12 /numpy/lib/io.py | |
parent | 97cc30a923b5907b0b51be44d315d883d7533153 (diff) | |
download | numpy-553a30079c37ebecf8a37b9ee1fbf219d1d09053.tar.gz |
Correctly handle gzip filenames in loadtxt.
Diffstat (limited to 'numpy/lib/io.py')
-rw-r--r-- | numpy/lib/io.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/lib/io.py b/numpy/lib/io.py index d2c55172f..d425eccb5 100644 --- a/numpy/lib/io.py +++ b/numpy/lib/io.py @@ -48,6 +48,9 @@ def seek_gzip_factory(f): def tell(self): return self.offset + if isinstance(f, str): + f = gzip.GzipFile(f) + f.seek = new.instancemethod(seek, f) f.tell = new.instancemethod(tell, f) |