Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent size returned from waverec2 #725

Open
landmanbester opened this issue Mar 14, 2024 · 0 comments
Open

Inconsistent size returned from waverec2 #725

landmanbester opened this issue Mar 14, 2024 · 0 comments
Labels

Comments

@landmanbester
Copy link

The output of waverec2 is not always consistent with the input of wavedec2. For example, the following

import numpy as np
import pywt
nx = 129
ny = 255
data = np.random.randn(nx, ny)
alpha = pywt.wavedec2(data, 'db1', mode='zero', level=1)
xrec = pywt.waverec2(alpha, 'db1', mode='zero')
print(data.shape, xrec.shape)
print(np.abs(data - xrec[0:data.shape[0],0:data.shape[1]]).max())

produces

(129, 255) (130, 256)
1.7763568394002505e-15

They do at least seem to be consistent within the overlap region. Is this the expected behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants