In [1]: import pywt
In [2]: w = pywt.Wavelet('db2')
...: data_len = 23
...: level = pywt.dwt_max_level(data_len, w)
...: while level > 0:
...: print(data_len, level)
...: data_len = pywt.dwt_coeff_len(data_len, w.dec_len, 'symmetric')
...: level = pywt.dwt_max_level(data_len, w)
...:
23 2
13 2
8 1
I'm using PyWavelets 1.10.0.
I was trying to find how many dwt levels an input data of length 23 will have.
Based on the while loop printouts, I thought the level for 23 should be 3 rather than 2?
I might have misunderstood what dwt_max_level does if this behavior was intended rather than a bug...
Thank you ahead of time for looking into this!
(btw, pywt.__version__ is still showing 1.8.0 b/c of this line.
I can make a separate issue for
__version__ if that's the preferred way to track issue with prs)
I'm using
PyWavelets1.10.0.I was trying to find how many dwt levels an input data of length
23will have.Based on the while loop printouts, I thought the level for
23should be3rather than2?I might have misunderstood what
dwt_max_leveldoes if this behavior was intended rather than a bug...Thank you ahead of time for looking into this!
(btw,
pywt.__version__is still showing1.8.0b/c of this line.pywt/util/version_utils.py
Line 6 in 65f19a7
__version__if that's the preferred way to track issue with prs)