insert(x, tck, m=1, per=0)¶
Insert knots into a B-spline.
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.
- x (u)array_like
A 1-D point at which to insert a new knot(s). If tck was returned from
splprep, then the parameter values, u should be given.
BSplineinstance or a tuple
If tuple, then it is expected to be a tuple (t,c,k) containing the vector of knots, the B-spline coefficients, and the degree of the spline.
- mint, optional
The number of times to insert the given knot (its multiplicity). Default is 1.
- perint, optional
If non-zero, the input spline is considered periodic.
- BSpline instance or a tuple
A new B-spline with knots t, coefficients c, and degree k.
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)<=xor at least k interior knots t(j) satisfying
x<=t(j)<t(n-k). A tuple is returned iff the input argument tck is a tuple, otherwise a BSpline object is constructed and returned.
Manipulating the tck-tuples directly is not recommended. In new code, prefer using the