[SciPy-User] another interpolation question
Friedrich Romstedt
friedrichromstedt at gmail.com
Sat Feb 19 07:46:09 EST 2011
2011/2/17 Pauli Virtanen <pav at iki.fi>:
> Try
>
> # some random data
> from numpy import *
> x = linspace(0, 1, 20)
> y = linspace(0, 3, 30)
> z = sin(x)[:,None] * cos(y)[None,:]
> x_fine = linspace(0, 1, 200)
> y_fine = linspace(0, 3, 140)
>
> from scipy.interpolate import RectBivariateSpline
> interp = RectBivariateSpline(x, y, z)
> z_fine = interp(x_fine, y_fine)
This is nice. Docs for scipy 0.6.0 [sic] are here:
http://www.scipy.org/doc/api_docs/SciPy.interpolate.fitpack2.RectBivariateSpline.html,
http://www.scipy.org/doc/api_docs/SciPy.interpolate.fitpack.html.
Seems the RectBivariateSpline does B-splines.
Seems the knot points are chosen as the data values (x, y).
__call__ is not documented.
Seems there is no similar thing as splprep() in fitpack2?
More information about the SciPy-User
mailing list