[SciPy-Dev] Bivariate interpolation and NaN
Fri Jun 10 01:26:01 CDT 2011
Dear Scipy developers
I am working on a project where we need to interpolate from gridded data to
We want it to be fast, bilinear (i.e. smooting is not important) and be able
to deal with NaN in a sensible way.
I looked at a few and settled for RectBivariateSpline which is part of
It works well but, we have encountered two problems:
1. If there is a single NaN in the grid, all interpolated points become
NaN even if the surrounding pixels are valid floating point numbers. I would
have expected NaNs only for points whose immediate neighbours contain NaN.
2. We have noticed small 'overshoots', i.e. interpolated values may be
outside the range of the gridded data. Can anyone tell me if this is
I am interested in thoughts on whether it is possible to achieve this. If
there is a need to reproduce my observations, I can provide that.
Cheers and thanks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev