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

add an equivalent of Matlab's wextend? #473

Closed
grlee77 opened this issue Mar 6, 2019 · 1 comment · Fixed by #478
Closed

add an equivalent of Matlab's wextend? #473

grlee77 opened this issue Mar 6, 2019 · 1 comment · Fixed by #478

Comments

@grlee77
Copy link
Contributor

grlee77 commented Mar 6, 2019

Matlab provides a function called wextend for padding a signal via the various boundary modes. In PyWavelets, the signal is not explicitly extended, but for efficiency the boundary modes are handled in the C convolution code.

However, I already implemented a function that replicates the behavior of wextend in 1D for the purpose of making a nice figure of the various boundary modes for the documentation.

Updating the existing, non-public pywt._doc_utils.pad function to be n-dimensional andexposing it under the name pywt.wextend should be fairly straightforward.

I'm not sure how common use of wextend would be, but I did notice that the implementation of wavelet adjoints linked in #472 makes use of it.

@rgommers
Copy link
Member

rgommers commented Mar 6, 2019

I think that makes sense, could be a useful function. wextend is a pretty bad name though (as usual in Matlab), why not just call it pad?

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

Successfully merging a pull request may close this issue.

2 participants