models.interpolations.interpolate.interpolate#
Interpolation (scipy.interpolate)#
Sub-package for objects used in interpolation.
As listed below, this sub-package contains spline functions and classes, 1-D and multidimensional (univariate and multivariate) interpolation classes, Lagrange and Taylor polynomial interpolators, and wrappers for FITPACK and DFITPACK functions.
Univariate interpolation#
|
Interpolate a 1-D function. |
|
Interpolating polynomial for a set of points. |
|
Interpolating polynomial for a set of points. |
|
Convenience function for polynomial interpolation. |
|
Convenience function for polynomial interpolation. |
|
Convenience function for pchip interpolation. |
|
Piecewise-cubic interpolator matching values and first derivatives. |
|
PCHIP 1-D monotonic cubic interpolation. |
|
Akima interpolator |
|
Cubic spline data interpolator. |
|
Piecewise polynomial in terms of coefficients and breakpoints |
|
Piecewise polynomial in terms of coefficients and breakpoints. |
Multivariate interpolation#
Unstructured data:
|
Interpolate unstructured D-D data. |
|
Piecewise linear interpolator in N > 1 dimensions. |
|
NearestNDInterpolator(x, y). |
|
CloughTocher2DInterpolator(points, values, tol=1e-6). |
|
Radial basis function (RBF) interpolation in N dimensions. |
|
A class for radial basis function interpolation of functions from N-D scattered data to an M-D domain. |
|
interp2d(x, y, z, kind='linear', copy=True, bounds_error=False, |
For data on a grid:
|
Multidimensional interpolation on regular or rectilinear grids. |
|
Interpolator on a regular or rectilinear grid in arbitrary dimensions. |
|
Bivariate spline approximation over a rectangular mesh. |
See also
scipy.ndimage.map_coordinates
Tensor product polynomials:
1-D Splines#
|
Univariate spline in the B-spline basis. |
|
Compute the (coefficients of) interpolating B-spline. |
|
Compute the (coefficients of) an LSQ (Least SQuared) based fitting B-spline. |
|
Compute the (coefficients of) smoothing cubic spline function using |
Functional interface to FITPACK routines:
|
Find the B-spline representation of a 1-D curve. |
|
Find the B-spline representation of an N-D curve. |
|
Evaluate a B-spline or its derivatives. |
|
Evaluate the definite integral of a B-spline between two given points. |
|
Find the roots of a cubic B-spline. |
|
Evaluate all derivatives of a B-spline. |
|
Compute the spline representation of the derivative of a given spline |
|
Compute the spline for the antiderivative (integral) of a given spline. |
|
Insert knots into a B-spline. |
Object-oriented FITPACK interface:
|
1-D smoothing spline fit to a given set of data points. |
|
1-D interpolating spline for a given set of data points. |
|
1-D spline with explicit internal knots. |
2-D Splines#
For data on a grid:
|
Bivariate spline approximation over a rectangular mesh. |
|
Bivariate spline approximation over a rectangular mesh on a sphere. |
For unstructured data:
Base class for bivariate splines. |
|
|
Smooth bivariate spline approximation. |
|
Smooth bivariate spline approximation in spherical coordinates. |
|
Weighted least-squares bivariate spline approximation. |
|
Weighted least-squares bivariate spline approximation in spherical coordinates. |
Low-level interface to FITPACK functions:
Additional tools#
|
Return a Lagrange interpolating polynomial. |
|
Estimate the Taylor polynomial of f at x by polynomial fitting. |
|
Return Pade approximation to a polynomial as the ratio of two polynomials. |
See also
scipy.ndimage.map_coordinates, scipy.ndimage.spline_filter, scipy.signal.resample, scipy.signal.bspline, scipy.signal.gauss_spline, scipy.signal.qspline1d, scipy.signal.cspline1d, scipy.signal.qspline1d_eval, scipy.signal.cspline1d_eval, scipy.signal.qspline2d, scipy.signal.cspline2d.
pchip is an alias of PchipInterpolator for backward compatibility
(should not be used in new code).
Modules
This module 'dfitpack' is auto-generated with f2py (version:2.0.0rc2). Functions: ier = fpchec(x,t,k) y,ier = splev(t,c,k,x,e=0) y,ier = splder(t,c,k,x,nu=1,e=0) splint,wrk = splint(t,c,k,a,b) zero,m,ier = sproot(t,c,mest=3*(n-7)) d,ier = spalde(t,c,k1,x) n,c,fp,ier = curfit(iopt,x,y,w,t,wrk,iwrk,xb=x[0],xe=x[m-1],k=3,s=0.0) n,c,fp,ier = percur(iopt,x,y,w,t,wrk,iwrk,k=3,s=0.0) n,c,fp,ier = parcur(iopt,ipar,idim,u,x,w,ub,ue,t,wrk,iwrk,k=3.0,s=0.0) x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurf0(x,y,k,w=1.0,xb=x[0],xe=x[m-1],s=m,nest=(s==0.0?m+k+1:MAX(m/2,2*k1))) x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurf1(x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier,overwrite_x=1,overwrite_y=1,overwrite_w=1,overwrite_t=1,overwrite_c=1,overwrite_fpint=1,overwrite_nrdata=1) x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier = fpcurfm1(x,y,k,t,w=1.0,xb=x[0],xe=x[m-1],overwrite_t=1) z,ier = bispev(tx,ty,c,kx,ky,x,y) z,ier = parder(tx,ty,c,kx,ky,nux,nuy,x,y) newc,ier = pardtc(tx,ty,c,kx,ky,nux,nuy) z,ier = bispeu(tx,ty,c,kx,ky,x,y) z,ier = pardeu(tx,ty,c,kx,ky,nux,nuy,x,y) nx,tx,ny,ty,c,fp,wrk1,ier = surfit_smth(x,y,z,w=1.0,xb=dmin(x,m),xe=dmax(x,m),yb=dmin(y,m),ye=dmax(y,m),kx=3,ky=3,s=m,nxest=imax(kx+1+sqrt(m/2),2*(kx+1)),nyest=imax(ky+1+sqrt(m/2),2*(ky+1)),eps=1e-16,lwrk2=calc_surfit_lwrk2(m,kx,ky,nxest,nyest)) tx,ty,c,fp,ier = surfit_lsq(x,y,z,nx,tx,ny,ty,w=1.0,xb=calc_b(x,m,tx,nx),xe=calc_e(x,m,tx,nx),yb=calc_b(y,m,ty,ny),ye=calc_e(y,m,ty,ny),kx=3,ky=3,eps=1e-16,lwrk2=calc_surfit_lwrk2(m,kx,ky,nxest,nyest),overwrite_tx=1,overwrite_ty=1) nt,tt,np,tp,c,fp,ier = spherfit_smth(teta,phi,r,w=1.0,s=m,eps=1e-16) tt,tp,c,fp,ier = spherfit_lsq(teta,phi,r,tt,tp,w=1.0,eps=1e-16,overwrite_tt=1,overwrite_tp=1) nx,tx,ny,ty,c,fp,ier = regrid_smth(x,y,z,xb=dmin(x,mx),xe=dmax(x,mx),yb=dmin(y,my),ye=dmax(y,my),kx=3,ky=3,s=0.0) nu,tu,nv,tv,c,fp,ier = regrid_smth_spher(iopt,ider,u,v,r,r0=,r1=,s=0.0) dblint = dblint(tx,ty,c,kx,ky,xb,xe,yb,ye) COMMON blocks: /types/ intvar . |
|
Simple N-D interpolation |
|