Does anyone know how to use ArrayFire's approx1/approx2 functions? I can't find examples of their usage online, and so cannot figure out what exactly the interpolation position arrays should be. I have tried af::approx2(inArray, af::where(inArray some condition), af::where(inArray some other condition), AF_INTERP_NEAREST)
along with similar examples where af::where()
is replaced with something like af::isNaN()
and no matter what I try, I cannot get approx1 or approx2 to work.
Thanks for the help!
Edit: The specific issue I am encountering is with the two af::array
parameters, where above I state that I have tried af::where(...)
. I do not know what specific types of af::array
to pass. The documentation's description of
array contains the interpolation locations
does not help in identifying what I need to pass to these functions. af::where()
and af::isNaN()
, both functions that return arrays describing positions of elements, cause an af::exception
at runtime.