[Question] scipy.interpolate.griddata function equivalent in ArrayFire
markBETA opened this issue · comments
Hi team,
I am trying to implement an equivalent of scipy.interpolate.griddata in a C++ library by using ArrayFire. The closer approach I found was to use af::approx2 function, but it only accepts uniformly spaced data, and I need to interpolate a scattered 2D grid.
Checking the implementation from scipy
, they use a Delaunay triangularization process to achieve that task. Is there any equivalent to performing the same task in ArrayFire?
I appreciate any help you can provide.
Best regards,
Marc
Hey Marc,
We don't currently support non-uniform interpolation. For the simpler case with a full grid of data, this feature is on our roadmap however the initial implementation is still incomplete and won't make it into the next release. As a workaround, you can do something similar to the function here, but for a 2d interpolation. This may also be a good candidate for a custom kernel operation with our interop functions. Thanks for your patience.
We'll look into the case of scattered, non-grid points and using Delaunay triangularization. That would be a cool function to add.
Hi syurkevi,
Thank you for your feedback. We ended up doing a mixed implementation with CGAL and ArrayFire.
Hi syurkevi,
Thank you for your feedback. We ended up doing a mixed implementation with CGAL and ArrayFire.
Would you by any chance be able to show an example of how you did Delaunay triangularization on ArrayFire Tensor using CGAL ?