scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
insert(x, tck, m=1, per=0)

Given the knots and coefficients of a B-spline representation, create a new B-spline with a knot inserted m times at point x. This is a wrapper around the FORTRAN routine insert of FITPACK.

Notes

Based on algorithms from and .

Parameters

x (u) : array_like

A 1-D point at which to insert a new knot(s). If :None:None:`tck` was returned from splprep , then the parameter values, u should be given.

tck : tuple

A tuple (t,c,k) returned by splrep or splprep containing the vector of knots, the B-spline coefficients, and the degree of the spline.

m : int, optional

The number of times to insert the given knot (its multiplicity). Default is 1.

per : int, optional

If non-zero, the input spline is considered periodic.

Returns

tck : tuple

A tuple (t,c,k) containing the vector of knots, the B-spline coefficients, and the degree of the new spline. t(k+1) <= x <= t(n-k) , where k is the degree of the spline. In case of a periodic spline ( per != 0 ) there must be either at least k interior knots t(j) satisfying t(k+1)<t(j)<=x or at least k interior knots t(j) satisfying x<=t(j)<t(n-k) .

Insert knots into a B-spline.

Examples

See :

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#1088
type: <class 'function'>
Commit: