def __call__(self, vals, maxdist=None):
"""
Evaluate interpolator for values given at the source points.
Parameters
----------
vals : ndarray of float, shape (numsourcepoints, ...)
Values at the source points which to interpolate
maxdist : the maximum distance up to which an interpolated values is
assigned - if maxdist is exceeded, np.nan will be assigned
If maxdist==None, values will be assigned everywhere
Returns
-------
output : ndarray of float with shape (numtargetpoints,...)
"""
self._check_shape(vals)
out = vals[self.ix]
if maxdist is None:
return out
else:
return np.where(self.dists > maxdist, np.nan, out)
评论列表
文章目录