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