scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
bisplrep(x, y, z, w=None, xb=None, xe=None, yb=None, ye=None, kx=3, ky=3, task=0, s=None, eps=1e-16, tx=None, ty=None, full_output=0, nxest=None, nyest=None, quiet=1)

Given a set of data points (x[i], y[i], z[i]) representing a surface z=f(x,y), compute a B-spline representation of the surface. Based on the routine SURFIT from FITPACK.

Notes

See bisplev to evaluate the value of the B-spline given its tck representation.

Parameters

x, y, z : ndarray

Rank-1 arrays of data points.

w : ndarray, optional

Rank-1 array of weights. By default w=np.ones(len(x)) .

xb, xe : float, optional

End points of approximation interval in x. By default xb = x.min(), xe=x.max() .

yb, ye : float, optional

End points of approximation interval in y. By default yb=y.min(), ye = y.max() .

kx, ky : int, optional

The degrees of the spline (1 <= kx, ky <= 5). Third order (kx=ky=3) is recommended.

task : int, optional

If task=0, find knots in x and y and coefficients for a given smoothing factor, s. If task=1, find knots and coefficients for another value of the smoothing factor, s. bisplrep must have been previously called with task=0 or task=1. If task=-1, find coefficients for a given set of knots tx, ty.

s : float, optional

A non-negative smoothing factor. If weights correspond to the inverse of the standard-deviation of the errors in z, then a good s-value should be found in the range (m-sqrt(2*m),m+sqrt(2*m)) where m=len(x).

eps : float, optional

A threshold for determining the effective rank of an over-determined linear system of equations (0 < eps < 1). :None:None:`eps` is not likely to need changing.

tx, ty : ndarray, optional

Rank-1 arrays of the knots of the spline for task=-1

full_output : int, optional

Non-zero to return optional outputs.

nxest, nyest : int, optional

Over-estimates of the total number of knots. If None then nxest = max(kx+sqrt(m/2),2*kx+3) , nyest = max(ky+sqrt(m/2),2*ky+3) .

quiet : int, optional

Non-zero to suppress printing of messages. This parameter is deprecated; use standard Python warning filters instead.

Returns

tck : array_like

A list [tx, ty, c, kx, ky] containing the knots (tx, ty) and coefficients (c) of the bivariate B-spline representation of the surface along with the degree of the spline.

fp : ndarray

The weighted sum of squared residuals of the spline approximation.

ier : int

An integer flag about splrep success. Success is indicated if ier<=0. If ier in [1,2,3] an error occurred but was not raised. Otherwise an error is raised.

msg : str

A message corresponding to the integer flag, ier.

Find a bivariate B-spline representation of a surface.

See Also

BivariateSpline
UnivariateSpline
splev
splint
splprep
splrep
sproot

Examples

Examples are given in the tutorial <tutorial-interpolate_2d_spline> .

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.interpolate._fitpack2.BivariateSpline scipy.interpolate._fitpack2.RectBivariateSpline scipy.interpolate._fitpack2.SphereBivariateSpline scipy.interpolate._fitpack2.SmoothBivariateSpline scipy.interpolate._fitpack_impl.splint scipy.interpolate._fitpack_impl.sproot scipy.interpolate._fitpack_py.splev scipy.interpolate._fitpack_impl.splev scipy.interpolate._fitpack2.UnivariateSpline scipy.interpolate._fitpack2.RectSphereBivariateSpline scipy.interpolate._fitpack2._BivariateSplineBase scipy.interpolate._fitpack_impl.splrep scipy.interpolate._fitpack2.LSQSphereBivariateSpline scipy.interpolate._fitpack2.LSQBivariateSpline scipy.interpolate._fitpack2.SmoothSphereBivariateSpline scipy.interpolate._fitpack_impl.splprep scipy.interpolate._fitpack_py.splrep scipy.interpolate._interpolate.interp2d scipy.interpolate._fitpack_py.sproot scipy.interpolate._fitpack_py.splint

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/interpolate/_fitpack_impl.py#798
type: <class 'function'>
Commit: