SciPy

This is documentation for an old release of SciPy (version 1.5.3). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.interpolate.RectBivariateSpline

class scipy.interpolate.RectBivariateSpline(x, y, z, bbox=[None, None, None, None], kx=3, ky=3, s=0)[source]

Bivariate spline approximation over a rectangular mesh.

Can be used for both smoothing and interpolating data.

Parameters
x,yarray_like

1-D arrays of coordinates in strictly ascending order.

zarray_like

2-D array of data with shape (x.size,y.size).

bboxarray_like, optional

Sequence of length 4 specifying the boundary of the rectangular approximation domain. By default, bbox=[min(x,tx),max(x,tx), min(y,ty),max(y,ty)].

kx, kyints, optional

Degrees of the bivariate spline. Default is 3.

sfloat, optional

Positive smoothing factor defined for estimation condition: sum((w[i]*(z[i]-s(x[i], y[i])))**2, axis=0) <= s Default is s=0, which is for interpolation.

See also

SmoothBivariateSpline

a smoothing bivariate spline for scattered data

bisplrep

an older wrapping of FITPACK

bisplev

an older wrapping of FITPACK

UnivariateSpline

a similar class for univariate spline interpolation

Methods

__call__(self, x, y[, dx, dy, grid])

Evaluate the spline or its derivatives at given positions.

ev(self, xi, yi[, dx, dy])

Evaluate the spline at points

get_coeffs(self)

Return spline coefficients.

get_knots(self)

Return a tuple (tx,ty) where tx,ty contain knots positions of the spline with respect to x-, y-variable, respectively.

get_residual(self)

Return weighted sum of squared residuals of the spline approximation: sum ((w[i]*(z[i]-s(x[i],y[i])))**2,axis=0)

integral(self, xa, xb, ya, yb)

Evaluate the integral of the spline over area [xa,xb] x [ya,yb].

Previous topic

scipy.interpolate.RegularGridInterpolator.__call__

Next topic

scipy.interpolate.RectBivariateSpline.__call__