You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an inconsistency in all wavedec functions relative to their waverec counterparts. If the signal is too small for the chosen wavelet, level will be set to 0 in wavedec and a length 1 coeffs_list containing only the original data will be returned. If this is then passed in to waverec, an error will occur, because it only allows coefficient lists of length >= 2.
There are two potential solutions here:
1.) raise an error in _check_level if level = 0.
2.) modify waverecn to allow length 1 coefficient arrays and just return coeffs[0] (which is the original data) if the coeffs input was length 1.
I would lean toward solution 2, possibly adding a warning in wavedecn and waverecn if level=0.
The text was updated successfully, but these errors were encountered:
closing this as I was mistaken and the waverecn transform` does already work as expected for a zero-level transform.
This is tested indirectly in test_multilevel.py where some tests involve large wavelets such as coif17 that exceed the test signal size resulting in a zero-level transform.
I found an inconsistency in all
wavedec
functions relative to theirwaverec
counterparts. If the signal is too small for the chosen wavelet,level
will be set to 0 inwavedec
and a length 1coeffs_list
containing only the original data will be returned. If this is then passed in towaverec
, an error will occur, because it only allows coefficient lists of length >= 2.There are two potential solutions here:
1.) raise an error in
_check_level
if level = 0.2.) modify
waverecn
to allow length 1 coefficient arrays and just returncoeffs[0]
(which is the original data) if the coeffs input was length 1.I would lean toward solution 2, possibly adding a warning in
wavedecn
andwaverecn
if level=0.The text was updated successfully, but these errors were encountered: