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

re-implement apply_kernel based on xarray rolling + dot #222

Open
clausmichele opened this issue Feb 5, 2024 · 2 comments
Open

re-implement apply_kernel based on xarray rolling + dot #222

clausmichele opened this issue Feb 5, 2024 · 2 comments
Assignees

Comments

@clausmichele
Copy link
Member

@VincentVerelst the convolution operation has been added to xarray (I wasn't aware of it). We can adapt the apply_kernel implementation and simplify the code.
pydata/xarray#4196 (comment)

Let me know if you would have time looking into it.

@VincentVerelst
Copy link
Contributor

Hi @clausmichele , I had a look at the rolling + dot approach via xarray. Is it not more difficult to handle borders via this approach? According to the spec, the following options are available: "numeric value, replicate, reflect, reflect_pixel, wrap".
These are readily available in scipy.ndimage.convolve, but apparently not in xarray.DataArray.rolling.

What are your thoughts on this?

@clausmichele
Copy link
Member Author

I started trying to re-implement it but it's not that easy as you expected. It doesn't have high priority at the moment, but when I'll have time I want to benchmark the two implementations.

@clausmichele clausmichele self-assigned this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants