How to apply Repa stencils with arbitrary size?

The Repa package has stencils that allow you to calculate values ​​from neighboring values ​​in a convenient way (useful for convolutions, blurring images, modeling diffusion, etc.).

In the current Repa package, I can create stencils of any shape, but only two-dimensional stencils can be applied using mapStencil2 . Is there a way to apply stencils to arrays with a different dimension? There is even a way to use one-dimensional stencils. I am looking for a way to apply 3D stencils.

thanks

+5
source share

Source: https://habr.com/ru/post/1258311/


All Articles