diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2010-11-19 12:20:34 -0800 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-11-20 00:30:40 +0100 |
commit | 4926abe4504a1954ec169e3541030ffe97db7526 (patch) | |
tree | a75dcad5eaeab90acdc7f254f09eb14ecd59e418 /numpy/add_newdocs.py | |
parent | 8cbed8ce5253a0aa4341e6edbf8be123a06bb123 (diff) | |
download | numpy-4926abe4504a1954ec169e3541030ffe97db7526.tar.gz |
DOC: Made problems with arange floating-point steps more clearly spelled out.
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r-- | numpy/add_newdocs.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 14cd2a890..baf5285f0 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -860,13 +860,18 @@ add_newdoc('numpy.core.multiarray', 'arange', `range <http://docs.python.org/lib/built-in-funcs.html>`_ function, but returns a ndarray rather than a list. + When using a non-integer step, such as 0.1, the results will often not + be consistent. It is better to use ``linspace`` for these cases. + Parameters ---------- start : number, optional Start of interval. The interval includes this value. The default start value is 0. stop : number - End of interval. The interval does not include this value. + End of interval. The interval does not include this value, except + in some cases where `step` is not an integer and floating point + round-off affects the length of `out`. step : number, optional Spacing between values. For any output `out`, this is the distance between two adjacent values, ``out[i+1] - out[i]``. The default |