class scipy.interpolate.LSQBivariateSpline(x, y, z, tx, ty, w=None, bbox=[None, None, None, None], kx=3, ky=3, eps=None)[source]#

Weighted least-squares bivariate spline approximation.

x, y, zarray_like

1-D sequences of data points (order is not important).

tx, tyarray_like

Strictly ordered 1-D sequences of knots coordinates.

warray_like, optional

Positive 1-D array of weights, of the same length as x, y and z.

bbox(4,) array_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.

epsfloat, optional

A threshold for determining the effective rank of an over-determined linear system of equations. eps should have a value within the open interval (0, 1), the default is 1e-16.

See also


a base class for bivariate splines.


a smooth univariate spline to fit a given set of data points.


a smoothing bivariate spline through the given points


a bivariate spline over a rectangular mesh on a sphere


a smoothing bivariate spline in spherical coordinates


a bivariate spline in spherical coordinates using weighted least-squares fitting


a bivariate spline over a rectangular mesh.


a function to find a bivariate B-spline representation of a surface


a function to evaluate a bivariate B-spline and its derivatives


The length of x, y and z should be at least (kx+1) * (ky+1).

If the input data is such that input dimensions have incommensurate units and differ by many orders of magnitude, the interpolant may have numerical artifacts. Consider rescaling the data before interpolating.


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

Evaluate the spline or its derivatives at given positions.

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

Evaluate the spline at points


Return spline coefficients.


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


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

integral(xa, xb, ya, yb)

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

partial_derivative(dx, dy)

Construct a new spline representing a partial derivative of this spline.