torch_interpolations icon indicating copy to clipboard operation
torch_interpolations copied to clipboard

Adapting code to mimic scipy.interpolate.griddata

Open frmrz opened this issue 3 years ago • 1 comments

Hi @sbarratt, thanks for this implementation.

I tested it against scipy.interpolate.griddata and I got very close results using torch and 'linear' interpolation. Have you noticed these differences?

Are you planning to add also the other methods in scipy.interpolate.griddata or can you tell where to adapt your code to implement those methods?

frmrz avatar Jun 17 '21 08:06 frmrz

I think this code only interpolates a grid, whereas scipy griddata interpolates unstructured data. So you can't actually write an equivalent code. When using RegularGridInterpolator you should provide in points a list of lists of coordinates along each axis, and in values, the values on all combination of coordinates along all those axes.

dmenig avatar May 11 '22 13:05 dmenig