[Numpy-tickets] [NumPy] #995: numpy.load can't handle gzip file handles
NumPy
numpy-tickets@scipy....
Sun Feb 22 03:20:22 CST 2009
#995: numpy.load can't handle gzip file handles
---------------------------+------------------------------------------------
Reporter: MatthewMiller | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: 1.3.0
Component: numpy.lib | Version: none
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Comment (by nils):
I have applied your patch against 1.3.0.dev6450.
Before I have applied the patch I get
{{{
python -i ticket_995.py
Traceback (most recent call last):
File "ticket_995.py", line 5, in ?
numpy.load(g)
File "/usr/lib/python2.4/site-packages/numpy/lib/io.py", line 150, in
load
fid.seek(-N,1) # back-up
TypeError: seek() takes exactly 2 arguments (3 given)
>>> g
<gzip open file 'test.gz', mode 'r' at 0x40fad218 0x40fa2f8c>
}}}
With the patch
{{{
python -i ticket_995.py
Traceback (most recent call last):
File "ticket_995.py", line 5, in ?
numpy.load(g)
File "/usr/lib/python2.4/site-packages/numpy/lib/io.py", line 197, in
load
raise IOError, \
IOError: Failed to interpret file <gzip open file 'test.gz', mode 'r' at
0x40fac260 0x40fa214c> as a pickle
}}}
--
Ticket URL: <http://www.scipy.org/scipy/numpy/ticket/995#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list