[Numpy-svn] r3285 - trunk/numpy/lib

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Oct 7 09:52:24 CDT 2006


Author: stefan
Date: 2006-10-07 09:52:08 -0500 (Sat, 07 Oct 2006)
New Revision: 3285

Modified:
   trunk/numpy/lib/function_base.py
Log:
Close ticket #328.


Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2006-10-07 08:50:25 UTC (rev 3284)
+++ trunk/numpy/lib/function_base.py	2006-10-07 14:52:08 UTC (rev 3285)
@@ -1289,7 +1289,7 @@
     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;



More information about the Numpy-svn mailing list