[Scipy-svn] r7182 - in trunk: doc/source scipy/interpolate

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Mar 7 14:32:36 EST 2011


Author: ptvirtan
Date: 2011-03-07 13:32:35 -0600 (Mon, 07 Mar 2011)
New Revision: 7182

Modified:
   trunk/doc/source/interpolate.rst
   trunk/scipy/interpolate/interpolate.py
Log:
DOC: fix unclear scipy.interpolate.interp2d documentation

Modified: trunk/doc/source/interpolate.rst
===================================================================
--- trunk/doc/source/interpolate.rst	2011-03-06 20:07:05 UTC (rev 7181)
+++ trunk/doc/source/interpolate.rst	2011-03-07 19:32:35 UTC (rev 7182)
@@ -32,15 +32,17 @@
    NearestNDInterpolator
    CloughTocher2DInterpolator
    Rbf
+   interp2d
 
-Data given on a regular grid:
+For data on a grid:
 
 .. autosummary::
-   :toctree: generated/
 
-   interp2d
+   RectBivariateSpline
 
+.. seealso:: `scipy.ndimage.map_coordinates`
 
+
 1-D Splines
 ===========
 
@@ -85,8 +87,6 @@
 2-D Splines
 ===========
 
-.. seealso:: scipy.ndimage.map_coordinates
-
 For data on a grid:
 
 .. autosummary::

Modified: trunk/scipy/interpolate/interpolate.py
===================================================================
--- trunk/scipy/interpolate/interpolate.py	2011-03-06 20:07:05 UTC (rev 7181)
+++ trunk/scipy/interpolate/interpolate.py	2011-03-07 19:32:35 UTC (rev 7182)
@@ -65,20 +65,22 @@
     Parameters
     ----------
     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, for example:
+        Arrays defining the data point coordinates.
 
-            x = [0,1,2];  y = [0,3,7]
+        If the points lie on a regular grid, `x` can specify the column
+        coordinates and `y` the row coordinates, for example::
 
-        otherwise x and y must specify the full coordinates, for example:
+            x = [0,1,2];  y = [0,3]; z = [[1,2,3], [4,5,6]]
 
-            x = [0,1,2,0,1,2,0,1,2];  y = [0,0,0,3,3,3,7,7,7]
+        Otherwise, x and y must specify the full coordinates for each point,
+        for example::
 
+            x = [0,1,2,0,1,2];  y = [0,0,0,3,3,3]; z = [1,2,3,4,5,6]
+
         If `x` and `y` are multi-dimensional, they are flattened before use.
 
     z : 1D array
-        The values of the interpolated function on the grid points. If
+        The values of the function to interpolate at the data points. If
         z is a multi-dimensional array, it is flattened before use.
     kind : {'linear', 'cubic', 'quintic'}
         The kind of interpolation to use.




More information about the Scipy-svn mailing list