interpolate_replace_nans(array, kernel, convolve=<function convolve>, **kwargs)¶
Given a data set containing NaNs, replace the NaNs by interpolating from neighboring data points with a given kernel.
Array to be convolved with
kernel. It can be of any dimensionality, though only 1, 2, and 3d arrays have been tested.
The convolution kernel. The number of dimensions should match those for the array. The dimensions do not have to be odd in all directions, unlike in the non-fft
convolvefunction. The kernel will be normalized if
normalize_kernelis set. It is assumed to be centered (i.e., shifts may result if your kernel is asymmetric). The kernel must be normalizable (i.e., its sum cannot be zero).
One of the two convolution functions defined in this package.
A copy of the original array with NaN pixels replaced with their interpolated counterparts