Small fix for test failure of WcsMapND interpolation method.
@@ -188,7 +188,13 @@ class WcsMapND(WcsMap):
from scipy.interpolate import griddata
grid_coords = self.geom.get_coords()
data = self.data[np.isfinite(self.data)]
- return griddata(grid_coords, data, coords, method=method)
+ vals = griddata(grid_coords, data, coords, method=method)
+ m = ~np.isfinite(vals)
+ if np.any(m):
+ vals_fill = griddata(grid_coords, data, tuple([c[m] for c in coords]),
+ method='nearest')
+ vals[m] = vals_fill
+ return vals
def interp_image(self, coords, order=1):
