[Scipy-svn] r6885 - trunk/scipy/interpolate
scipy-svn at scipy.org
scipy-svn at scipy.org
Sun Nov 14 04:59:06 EST 2010
Author: rgommers
Date: 2010-11-14 03:59:06 -0600 (Sun, 14 Nov 2010)
New Revision: 6885
Modified:
trunk/scipy/interpolate/__init__.py
trunk/scipy/interpolate/interpolate.py
trunk/scipy/interpolate/rbf.py
Log:
DOC: merge wiki edits for interpolate module.
Modified: trunk/scipy/interpolate/__init__.py
===================================================================
--- trunk/scipy/interpolate/__init__.py 2010-11-14 09:58:41 UTC (rev 6884)
+++ trunk/scipy/interpolate/__init__.py 2010-11-14 09:59:06 UTC (rev 6885)
@@ -1,3 +1,133 @@
+"""
+Sub-package for objects used in interpolation.
+
+As listed below, this sub-package contains spline functions and classes,
+one-dimensional and multi-dimensional (univariate and multivariate)
+interpolation classes, Lagrange and Taylor polynomial interpolators, and
+wrappers for `FITPACK <http://www.cisl.ucar.edu/softlib/FITPACK.html>`_
+and DFITPACK functions.
+
+Spline Functions
+----------------
+
+.. autosummary::
+ :toctree: generated/
+
+ bisplev
+ bisplrep
+ insert
+ spalde
+ splev
+ spleval
+ splint
+ spline
+ splmake
+ splprep
+ splrep
+ spltopp
+ sproot
+
+Spline Classes
+--------------
+
+.. autosummary::
+ :toctree: generated/
+
+ UnivariateSpline
+ InterpolatedUnivariateSpline
+ LSQUnivariateSpline
+ BivariateSpline
+ SmoothBivariateSpline
+
+Interpolation Classes (univariate)
+----------------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ interp1d
+ BarycentricInterpolator
+ barycentric_interpolate
+ KroghInterpolator
+ krogh_interpolate
+ PiecewisePolynomial
+ piecewise_polynomial_interpolate
+ ppform
+
+Interpolation Classes (multivariate)
+------------------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ interp2d
+ Rbf
+
+Additional tools
+----------------
+
+.. autosummary::
+ :toctree: generated/
+
+ lagrange
+ approximate_taylor_polynomial
+
+Wrappers around FITPACK functions
+---------------------------------
+
+.. autosummary::
+ :toctree: generated/
+
+ fitpack.bisplev
+ fitpack.bisplrep
+ fitpack.insert
+ fitpack.spalde
+ fitpack.splev
+ fitpack.splint
+ fitpack.splprep
+ fitpack.splrep
+ fitpack.sproot
+
+Wrappers around DFITPACK functions
+----------------------------------
+
+ `dfitpack.bispeu`
+ `dfitpack.bispev`
+ `dfitpack.curfit`
+ `dfitpack.dblint`
+ `dfitpack.fpcurf0`
+ `dfitpack.fpcurf1`
+ `dfitpack.fpcurfm1`
+ `dfitpack.parcur`
+ `dfitpack.percur`
+ `dfitpack.regrid_smth`
+ `dfitpack.spalde`
+ `dfitpack.splder`
+ `dfitpack.splev`
+ `dfitpack.splint`
+ `dfitpack.sproot`
+ `dfitpack.surfit_lsq`
+ `dfitpack.surfit_smth`
+
+See Also
+--------
+
+.. autosummary::
+ :toctree: generated/
+
+ ndimage.map_coordinates
+ ndimage.spline_filter
+ signal.resample
+ signal.bspline
+ signal.gauss_spline
+ signal.qspline1d
+ signal.cspline1d
+ signal.qspline1d_eval
+ signal.cspline1d_eval
+ signal.qspline2d
+ signal.cspline2d
+
+"""
#
# interpolate - Interpolation Tools
#
Modified: trunk/scipy/interpolate/interpolate.py
===================================================================
--- trunk/scipy/interpolate/interpolate.py 2010-11-14 09:58:41 UTC (rev 6884)
+++ trunk/scipy/interpolate/interpolate.py 2010-11-14 09:59:06 UTC (rev 6885)
@@ -23,10 +23,22 @@
return all
def lagrange(x, w):
- """Return the Lagrange interpolating polynomial of the data-points (x,w)
+ """
+ Return a Lagrange interpolating polynomial.
- Warning: This implementation is numerically unstable; do not expect to
+ Given two 1-D arrays `x` and `w,` returns the Lagrange interpolating
+ polynomial through the points ``(x, w)``.
+
+ Warning: This implementation is numerically unstable. Do not expect to
be able to use more than about 20 points even if they are chosen optimally.
+
+ Parameters
+ ----------
+ x : array_like
+ `x` represents the x-coordinates of a set of datapoints.
+ w : array_like
+ `w` represents the y-coordinates of a set of datapoints, i.e. f(`x`).
+
"""
M = len(x)
p = poly1d(0.0)
@@ -55,11 +67,11 @@
x, y : 1D arrays
Arrays defining the coordinates of a 2D grid. If the
points lie on a regular grid, `x` can specify the column coordinates
- and `y` the row coordinates, e.g.::
+ and `y` the row coordinates, for example:
x = [0,1,2]; y = [0,3,7]
- otherwise x and y must specify the full coordinates, i.e.::
+ otherwise x and y must specify the full coordinates, for example:
x = [0,1,2,0,1,2,0,1,2]; y = [0,0,0,3,3,3,7,7,7]
Modified: trunk/scipy/interpolate/rbf.py
===================================================================
--- trunk/scipy/interpolate/rbf.py 2010-11-14 09:58:41 UTC (rev 6884)
+++ trunk/scipy/interpolate/rbf.py 2010-11-14 09:59:06 UTC (rev 6885)
@@ -72,9 +72,9 @@
'quintic': r**5
'thin_plate': r**2 * log(r)
- If callable, then it must take 2 arguments (self, r). The epsilon parameter
- will be available as self.epsilon. Other keyword arguments passed in will
- be available as well.
+ If callable, then it must take 2 arguments (self, r). The epsilon
+ parameter will be available as self.epsilon. Other keyword
+ arguments passed in will be available as well.
epsilon : float, optional
Adjustable constant for gaussian or multiquadrics functions
@@ -93,13 +93,14 @@
return sqrt( ((x1 - x2)**2).sum(axis=0) )
which is called with x1=x1[ndims,newaxis,:] and
- x2=x2[ndims,:,newaxis] such that the result is a matrix of the distances
- from each point in x1 to each point in x2.
+ x2=x2[ndims,:,newaxis] such that the result is a matrix of the
+ distances from each point in x1 to each point in x2.
Examples
--------
>>> rbfi = Rbf(x, y, z, d) # radial basis function interpolator instance
>>> di = rbfi(xi, yi, zi) # interpolated values
+
"""
def _euclidean_norm(self, x1, x2):
More information about the Scipy-svn
mailing list