summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-10-07 14:52:08 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-10-07 14:52:08 +0000
commita09fa7d6edf0d39adecc0b96e8644be2b23cf234 (patch)
tree90f8dd71ac2bb00ea136d683163a55e80736efa5 /numpy/lib/function_base.py
parent8d93420410253b4954a011f6435671fb042cc08e (diff)
downloadnumpy-a09fa7d6edf0d39adecc0b96e8644be2b23cf234.tar.gz
Close ticket #328.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 84c0e5772..c1431c87c 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1289,7 +1289,7 @@ def insert(arr, obj, values, axis=None):
newshape = list(arr.shape)
if isinstance(obj, (int, long, integer)):
if (obj < 0): obj += N
- if (obj < 0 or obj > N or (obj == N and N != 0)):
+ if obj < 0 or obj > N:
raise ValueError, "index (%d) out of range (0<=index<=%d) "\
"in dimension %d" % (obj, N, axis)
newshape[axis] += 1;