Your message dated Mon, 7 Nov 2011 21:14:35 +0100
with message-id
<CAPdtAj07kPKBFJ3bzthy=qsg5J=x_1sm4xwbahs0ec1kgw0...@mail.gmail.com>
and subject line Re: [Python-modules-team] Processed: tagging 564774
has caused the Debian Bug report #564774,
regarding python-numpy: savez() does _not_ compress
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
564774: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564774
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-numpy
Version: 1:1.3.0-3
Severity: normal
Hi,
the docs of the savez() function say:
| Save several arrays into a single, compressed file with extension ".npz"
However, that is not the case. Here is a short dump of an IPython
session to show it:
>>> import numpy as np
>>> np.savez('test.npz', N.ones((10000, 1000)))
>>> ll -h *.npz
-rw-r--r-- 1 michael michael 77M 2010-01-11 15:52 test.npz
>>> !gzip test.npz
>>> ll -h test*.gz
-rw-r--r-- 1 michael michael 114K 2010-01-11 15:52 test.npz.gz
^^^^
If I want to load my "hand-compressed", renamed to have .npz extension,
file I get this (2 attempts):
In [1]: N.load('test.npz')
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
/tmp/<ipython console> in <module>()
/usr/lib/python2.5/site-packages/numpy/lib/io.pyc in load(file, mmap_mode)
199 except:
200 raise IOError, \
--> 201 "Failed to interpret file %s as a pickle" % repr(file)
202
203 def save(file, arr):
IOError: Failed to interpret file 'test.npz' as a pickle
In [3]: import gzip
In [4]: N.load(gzip.open('test.npz'))
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
/tmp/<ipython console> in <module>()
/usr/lib/python2.5/site-packages/numpy/lib/io.pyc in load(file, mmap_mode)
188 fid.seek(-N,1) # back-up
189 if magic.startswith(_ZIP_PREFIX): # zip-file (assume .npz)
--> 190 return NpzFile(fid)
191 elif magic == format.MAGIC_PREFIX: # .npy file
192 if mmap_mode:
/usr/lib/python2.5/site-packages/numpy/lib/io.pyc in __init__(self, fid)
83 # component of the so-called standard library.
84 import zipfile
---> 85 _zip = zipfile.ZipFile(fid)
86 self._files = _zip.namelist()
87 self.files = []
/usr/lib/python2.5/zipfile.pyc in __init__(self, file, mode, compression,
allowZip64)
344
345 if key == 'r':
--> 346 self._GetContents()
347 elif key == 'w':
348 pass
/usr/lib/python2.5/zipfile.pyc in _GetContents(self)
364 is bad."""
365 try:
--> 366 self._RealGetContents()
367 except BadZipfile:
368 if not self._filePassed:
/usr/lib/python2.5/zipfile.pyc in _RealGetContents(self)
374 """Read in the table of contents for the ZIP file."""
375 fp = self.fp
--> 376 endrec = _EndRecData(fp)
377 if not endrec:
378 raise BadZipfile, "File is not a zip file"
/usr/lib/python2.5/zipfile.pyc in _EndRecData(fpin)
131 The data is a list of the nine items in the ZIP "End of central dir"
132 record followed by a tenth item, the file seek offset of this
record."""
--> 133 fpin.seek(-22, 2) # Assume no archive comment.
134 filesize = fpin.tell() + 22 # Get file size
135 data = fpin.read()
/usr/lib/python2.5/site-packages/numpy/lib/io.pyc in seek(self, offset, whence)
36
37 if whence not in [0, 1]:
---> 38 raise IOError, "Illegal argument"
39
40 if offset < self.offset:
IOError: Illegal argument
Thanks,
Michael
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-numpy depends on:
ii libatlas3gf-base [liblapack. 3.6.0-24 Automatically Tuned Linear Algebra
ii libblas3gf [libblas.so.3gf] 1.2-2 Basic Linear Algebra Subroutines 3
ii libc6 2.10.2-2 GNU C Library: Shared libraries
ii libgcc1 1:4.4.2-3 GCC support library
ii libgfortran3 4.4.2-3 Runtime library for GNU Fortran ap
ii liblapack3gf [liblapack.so.3 3.2.1-2 library of linear algebra routines
ii python 2.5.4-2 An interactive high-level object-o
ii python-central 0.6.14+nmu2 register and build utility for Pyt
python-numpy recommends no packages.
Versions of packages python-numpy suggests:
ii python-nose 0.11.1-1 test discovery and running for Pyt
pn python-numpy-dbg <none> (no description available)
pn python-numpy-doc <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 1:1.6.1-1
On Mon, Nov 7, 2011 at 19:57, Debian Bug Tracking System
<[email protected]> wrote:
> Processing commands for [email protected]:
>
>> tags 564774 + fixed-upstream
If it's fine for you, it's fine for me too.
Cheers,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
--- End Message ---