[SciPy-User] 2D interpolation on random points of a function defined on a regular grid

Pauli Virtanen pav@iki...
Wed Apr 24 02:20:34 CDT 2013

Antonio <tritemio <at> gmail.com> writes:
> import scipy.interpolate as SI
> interp_fun = SI.interp2d(xd,yd,data)
> z = interp_fun(x,y)


interp_fun = SI.RectBivariateSpline(xd, yd, data.T)
z = interp_fun.ev(x, y)

Note that this expects the data be in (nx, ny) shape,
hence the transpose.

Pauli Virtanen

More information about the SciPy-User mailing list