[Numpy-svn] r4377 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Sat Nov 3 01:02:57 CDT 2007


Author: cookedm
Date: 2007-11-03 01:02:55 -0500 (Sat, 03 Nov 2007)
New Revision: 4377

Modified:
   trunk/numpy/lib/function_base.py
Log:
Expand linspace docstring.


Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2007-11-02 10:49:49 UTC (rev 4376)
+++ trunk/numpy/lib/function_base.py	2007-11-03 06:02:55 UTC (rev 4377)
@@ -35,7 +35,35 @@
 
     Return num evenly spaced samples from start to stop.  If
     endpoint is True, the last sample is stop. If retstep is
-    True then return the step value used.
+    True then return (seq, step_value), where step_value used.
+
+    :Parameters:
+        start : {float}
+            The value the sequence starts at.
+        stop : {float}
+            The value the sequence stops at. If ``endpoint`` is false, then
+            this is not included in the sequence. Otherwise it is
+            guaranteed to be the last value.
+        num : {integer}
+            Number of samples to generate. Default is 50.
+        endpoint : {boolean}
+            If true, ``stop`` is the last sample. Otherwise, it is not
+            included. Default is true.
+        retstep : {boolean}
+            If true, return ``(samples, step)``, where ``step`` is the
+            spacing used in generating the samples.
+
+    :Returns:
+        samples : {array}
+            ``num`` equally spaced samples from the range [start, stop]
+            or [start, stop).
+        step : {float} (Only if ``retstep`` is true)
+            Size of spacing between samples.
+
+    :See Also:
+        `arange` : Similiar to linspace, however, when used with
+            a float endpoint, that endpoint may or may not be included.
+        `logspace`
     """
     num = int(num)
     if num <= 0:



More information about the Numpy-svn mailing list