From 973779460434e0a26e0f0e5c7dd566cf6a47c5c5 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 21 Aug 2006 19:55:37 +0000 Subject: Remove usage of FatalError and fix linspace to end at stop if endpoint is True --- numpy/lib/function_base.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/lib/function_base.py') 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: -- cgit v1.2.1