[Scipy-svn] r4583 - in branches/Interpolate1D/docs: . build/doctrees build/html build/html/_sources

scipy-svn@scip... scipy-svn@scip...
Wed Jul 30 15:32:35 CDT 2008

```Author: fcady
Date: 2008-07-30 15:32:32 -0500 (Wed, 30 Jul 2008)
New Revision: 4583

Modified:
branches/Interpolate1D/docs/build/doctrees/environment.pickle
branches/Interpolate1D/docs/build/doctrees/tutorial.doctree
branches/Interpolate1D/docs/build/html/_sources/tutorial.txt
branches/Interpolate1D/docs/build/html/searchindex.json
branches/Interpolate1D/docs/build/html/tutorial.html
branches/Interpolate1D/docs/tutorial.rst
Log:
improved docstrings and documentation

Modified: branches/Interpolate1D/docs/build/doctrees/environment.pickle
===================================================================
(Binary files differ)

Modified: branches/Interpolate1D/docs/build/doctrees/tutorial.doctree
===================================================================
(Binary files differ)

Modified: branches/Interpolate1D/docs/build/html/_sources/tutorial.txt
===================================================================
--- branches/Interpolate1D/docs/build/html/_sources/tutorial.txt	2008-07-30 20:14:30 UTC (rev 4582)
+++ branches/Interpolate1D/docs/build/html/_sources/tutorial.txt	2008-07-30 20:32:32 UTC (rev 4583)
@@ -21,7 +21,8 @@
Basic Usage
-------------

-The following example uses the 'interp1d' function to linearly interpolate a sin curve from a sparse set of values.::
+The following example uses the 'interp1d' function to linearly interpolate a sin
+curve from a sparse set of values. ::

# start up ipython for our examples.
\$ ipython -pylab
@@ -41,25 +42,24 @@
In [9]: interp1d(x, y, array(1.2) )
Out [10]: 0.76394372684109768

-	# To interpolate from these x,y values at multiple points, possibly to get a more dense set of new_x, new_y values,
-    # pass a numpy array to interp1d, and the return type will also be a numpy array.
+	# To interpolate from these x,y values at multiple points, possibly to get a more dense set
+    # of new_x, new_y values to approximate the function, pass a numpy array to interp1d,
+    # and the return type will also be a numpy array.
In [4]: new_x = linspace(0, 2*pi, 21)
In [5]: new_y = interp1d(x, y, new_x)

# Plot the results using matplotlib. [note examples assume you are running in ipython -pylab]
In [6]: plot(x, y, 'ro', new_x, new_y, 'b-')

-.. image:: interp1d_linear_simple.png
+.. image:: interp1d_linear_simple.png

::
-
+
# Alternatively, x, y and new_x can also be lists (they are internally converted into arrays
# before processing)
In []: interp1d( [1.0, 2.0], [1.0, 2.0], [1.3] )
Out []: array([ 1.3 ])
-

-
What happens if we pass in a new_x with values outside the range of x?  By default, new_y will be
NaN at all such points: ::

@@ -68,7 +68,6 @@
In [7]: interp1d(x, y, array([-2, -1, 1, 2]))
Out [8]: array([        NaN,     NaN,     0.63661977,   0.72676046])

-
If we want a type of interpolation other than linear, there is a range of options which we can specify
with the keyword argument interp, which is usually a string.  For example::

@@ -78,7 +77,6 @@

-
There is a large selection of strings which specify a range of interpolation methods.  The list includes:

#. 'linear' : linear interpolation, same as the default

Modified: branches/Interpolate1D/docs/build/html/searchindex.json
===================================================================
--- branches/Interpolate1D/docs/build/html/searchindex.json	2008-07-30 20:14:30 UTC (rev 4582)
+++ branches/Interpolate1D/docs/build/html/searchindex.json	2008-07-30 20:32:32 UTC (rev 4583)
@@ -1 +1 @@
\ No newline at end of file
\ No newline at end of file

Modified: branches/Interpolate1D/docs/build/html/tutorial.html
===================================================================
--- branches/Interpolate1D/docs/build/html/tutorial.html	2008-07-30 20:14:30 UTC (rev 4582)
+++ branches/Interpolate1D/docs/build/html/tutorial.html	2008-07-30 20:32:32 UTC (rev 4583)
@@ -59,7 +59,8 @@
<div class="section">
-<p>The following example uses the &#8216;interp1d&#8217; function to linearly interpolate a sin curve from a sparse set of values.:</p>
+<p>The following example uses the &#8216;interp1d&#8217; function to linearly interpolate a sin
+curve from a sparse set of values.</p>
<pre>    # start up ipython for our examples.
\$ ipython -pylab

@@ -78,8 +79,9 @@
In [9]: interp1d(x, y, array(1.2) )
Out [10]: 0.76394372684109768

-    # To interpolate from these x,y values at multiple points, possibly to get a more dense set of new_x, new_y values,
-# pass a numpy array to interp1d, and the return type will also be a numpy array.
+    # To interpolate from these x,y values at multiple points, possibly to get a more dense set
+# of new_x, new_y values to approximate the function, pass a numpy array to interp1d,
+# and the return type will also be a numpy array.
In [4]: new_x = linspace(0, 2*pi, 21)
In [5]: new_y = interp1d(x, y, new_x)

Modified: branches/Interpolate1D/docs/tutorial.rst
===================================================================
--- branches/Interpolate1D/docs/tutorial.rst	2008-07-30 20:14:30 UTC (rev 4582)
+++ branches/Interpolate1D/docs/tutorial.rst	2008-07-30 20:32:32 UTC (rev 4583)
@@ -21,7 +21,8 @@
Basic Usage
-------------

-The following example uses the 'interp1d' function to linearly interpolate a sin curve from a sparse set of values.::
+The following example uses the 'interp1d' function to linearly interpolate a sin
+curve from a sparse set of values. ::

# start up ipython for our examples.
\$ ipython -pylab
@@ -41,25 +42,24 @@
In [9]: interp1d(x, y, array(1.2) )
Out [10]: 0.76394372684109768

-	# To interpolate from these x,y values at multiple points, possibly to get a more dense set of new_x, new_y values,
-    # pass a numpy array to interp1d, and the return type will also be a numpy array.
+	# To interpolate from these x,y values at multiple points, possibly to get a more dense set
+    # of new_x, new_y values to approximate the function, pass a numpy array to interp1d,
+    # and the return type will also be a numpy array.
In [4]: new_x = linspace(0, 2*pi, 21)
In [5]: new_y = interp1d(x, y, new_x)

# Plot the results using matplotlib. [note examples assume you are running in ipython -pylab]
In [6]: plot(x, y, 'ro', new_x, new_y, 'b-')

-.. image:: interp1d_linear_simple.png
+.. image:: interp1d_linear_simple.png

::
-
+
# Alternatively, x, y and new_x can also be lists (they are internally converted into arrays
# before processing)
In []: interp1d( [1.0, 2.0], [1.0, 2.0], [1.3] )
Out []: array([ 1.3 ])
-

-
What happens if we pass in a new_x with values outside the range of x?  By default, new_y will be
NaN at all such points: ::

@@ -68,7 +68,6 @@
In [7]: interp1d(x, y, array([-2, -1, 1, 2]))
Out [8]: array([        NaN,     NaN,     0.63661977,   0.72676046])

-
If we want a type of interpolation other than linear, there is a range of options which we can specify
with the keyword argument interp, which is usually a string.  For example::

@@ -78,7 +77,6 @@