diff options
author | cookedm <cookedm@localhost> | 2007-11-03 06:02:55 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2007-11-03 06:02:55 +0000 |
commit | 18d3af5ea658b0f1846e5307fe60263312d52bdd (patch) | |
tree | 84aa1244f724ca496fbeaacfc998c337b5c0f166 /numpy/lib/function_base.py | |
parent | 4cd7a18e808e818833a838e5338d614ee5b8bab6 (diff) | |
download | numpy-18d3af5ea658b0f1846e5307fe60263312d52bdd.tar.gz |
Expand linspace docstring.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 0463c48f5..711c609e8 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -35,7 +35,35 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False): 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: |