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

filter2 not working with n x 1 matrices #54

Open
balwierz opened this issue Mar 1, 2021 · 2 comments
Open

filter2 not working with n x 1 matrices #54

balwierz opened this issue Mar 1, 2021 · 2 comments
Labels

Comments

@balwierz
Copy link

balwierz commented Mar 1, 2021

Hi,

I am getting an error while running filter2 on a 1-column matrix:
EBImage::filter2(matrix(rnorm(10), ncol = 1), filter = matrix(c(0.25, 0.5, 0.25), ncol = 1))

Error in res[idxRowAppend, nC:2] : subscript out of bounds

There is no problem with a "transposed" (horizontal) call:
EBImage::filter2(matrix(rnorm(10), nrow = 1), filter = matrix(c(0.25, 0.5, 0.25), nrow = 1))

Nor is there a problem with applying a 1-column filter on a multi-dimensional data:
EBImage::filter2(matrix(rnorm(10), ncol = 2), filter = matrix(c(0.25, 0.5, 0.25), ncol = 1))

@aoles
Copy link
Owner

aoles commented Mar 1, 2021

Hi there! :)

Thanks for pointing this out. Actually, the error comes from the upstream function fftwtools::fftw2d. Would you mind reporting this to the maintainer of fftwtools?

Cheers!
Andrzej

@aoles aoles added the bug label Mar 1, 2021
@balwierz
Copy link
Author

balwierz commented Mar 2, 2021

Thanks :)
Reported as krahim/fftwtools#14

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