summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-21 19:55:37 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-21 19:55:37 +0000
commit973779460434e0a26e0f0e5c7dd566cf6a47c5c5 (patch)
treec0f02ce02c0317773b5ea652a4ac2618f6e6d944 /numpy/lib/function_base.py
parent77732fafe67896acd72c96b237154051f85732df (diff)
downloadnumpy-973779460434e0a26e0f0e5c7dd566cf6a47c5c5.tar.gz
Remove usage of FatalError and fix linspace to end at stop if endpoint is True
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py2
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: