Did I find the right examples for you? yes no

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/p/y/pycompsense-0.1.3/examples/test_dwt.py   pycompsense(Download)
 
    x = np.array([np.arange(16)] * 16, 'd')
    wp = pywt.WaveletPacket2D(data=x, wavelet='db1', mode='sym', maxlevel=2)
    data = [n.data for n in wp.get_leaf_nodes(decompose=True)]
    d = np.array(data)
    new_wp = pywt.WaveletPacket2D(data=None, wavelet='db1', mode='sym', maxlevel=2)

src/p/y/PyWavelets-0.2.2/demo/wp_2d.py   PyWavelets(Download)
import pylab
 
from pywt import WaveletPacket2D
 
im = Image.open("data/aero.png").convert('L')
arr = numpy.fromstring(im.tostring(), numpy.uint8)
arr.shape = (im.size[1], im.size[0])
 
wp2 = WaveletPacket2D(arr, 'db2', 'sym', maxlevel=2)