Alternatives to scipy.interpolate.griddata that don't hang on aligned points

岁酱吖の 提交于 2019-12-06 10:30:34

My solution has been to stochastically perturb the x and y coordinates of each input point by a random factor between 1e-6 * grid_cell_size. I choose 1e-6 as a rule of thumb of several orders of magnitude greater than the minimum delta difference in a 32 bit float, yet small enough that the error introduced by it is still shadowed by the error introduced by the interpolation scheme.

I'm still open to other ideas, but this way I can use the stock interpolation functions provided by scipy by introducing a very small numerical error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!