diff options
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 0753f18f7..172dddfea 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -39,11 +39,11 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False): if num == 1: return array([float(start)]) step = (stop-start)/float((num-1)) + y = _nx.arange(0, num) * step + start + y[-1] = stop else: step = (stop-start)/float(num) - y = _nx.arange(0, num) * step + start - if endpoint: - y[-1] = stop + y = _nx.arange(0, num) * step + start if retstep: return y, step else: |