Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Commit

Permalink
DOC: fix unclear scipy.interpolate.interp2d documentation
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.scipy.org/svn/scipy/trunk@7182 d6536bca-fef9-0310-8506-e4c0a848fbcf
  • Loading branch information
ptvirtan committed Mar 7, 2011
1 parent c20d22a commit 06bb0d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
10 changes: 5 additions & 5 deletions doc/source/interpolate.rst
Expand Up @@ -32,13 +32,15 @@ Unstructured data:
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
Expand Down Expand Up @@ -85,8 +87,6 @@ Low-level interface to FITPACK functions:
2-D Splines
===========

.. seealso:: scipy.ndimage.map_coordinates

For data on a grid:

.. autosummary::
Expand Down
16 changes: 9 additions & 7 deletions scipy/interpolate/interpolate.py
Expand Up @@ -65,20 +65,22 @@ class interp2d(object):
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.
Expand Down

0 comments on commit 06bb0d9

Please sign in to comment.