[Python-modules-team] Bug#510922: python-pywt: wp.reconstruct() might fail with '...must satisfy (0 <= len(cA) - len(cD) <= 1).'
Yaroslav Halchenko
debian at onerussian.com
Mon Jan 5 23:54:27 UTC 2009
Package: python-pywt
Version: 0.1.7~svn97-1
Severity: normal
Yet another obstacle I found while analysing some of my data.
If pruning has occured, wp.reconstruct() might fail when I guess it should have not.
,---
| /usr/lib/python2.4/site-packages/pywt/wavelet_packets.pyc in reconstruct(self, update)
| 85 raise ValueError, "Can not reconstruct. Tree is missing data"
| 86 else:
| ---> 87 rec = idwt(data_a, data_d, self.wavelet, self.mode, correct_size=True)
| 88 if update:
| 89 self.data = rec
|
| /usr/lib/python2.4/site-packages/pywt/_pywt.so in pywt._pywt.idwt()
|
| ValueError: Coefficients arrays must satisfy (0 <= len(cA) - len(cD) <= 1).
`---
Length at the place of failure are
ipdb> len(data_a)
260
ipdb> len(data_d)
252
behavior stays the same when I change padding mode to 'sym'.
Also problem doesn't occur if none of the nodes got pruned
I am attaching again that example file with embedded data snippet and adjusted
threshold to reproduce the problem.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (991, 'testing'), (990, 'unstable'), (300, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-pywt depends on:
ii libc6 2.7-15 GNU C Library: Shared libraries
ii python 2.5.2-2 An interactive high-level object-o
ii python-central 0.6.8 register and build utility for Pyt
ii python-numpy 1:1.1.0-3 Numerical Python adds a fast array
python-pywt recommends no packages.
python-pywt suggests no packages.
-- debconf-show failed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wp_simple_compression_3.py
Type: text/x-java
Size: 8646 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20090105/c02019ae/attachment.java
More information about the Python-modules-team
mailing list