How to find the nearest point on a grid?

I posted the Interpolations.jl code based on the Python code you originally posted, but upon further inspection it looks like you are not interpolating but discretizing. So what I posted seems irrelevant to what you’re looking for.

1 Like