From 38fb6d0ed7881d4e4c28d242f9017e500cf34f20 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 21 Aug 2006 20:45:00 +0000 Subject: Re-factor fix to linspace --- numpy/lib/function_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/lib/function_base.py') 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: -- cgit v1.2.1