[Numpy-svn] r5009 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Wed Apr 9 18:52:21 CDT 2008


Author: charris
Date: 2008-04-09 18:52:17 -0500 (Wed, 09 Apr 2008)
New Revision: 5009

Modified:
   trunk/numpy/core/src/arrayobject.c
Log:
Fix bound in error message. Patch from Andrew Straw, fixes ticket 732.


Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2008-04-09 20:30:07 UTC (rev 5008)
+++ trunk/numpy/core/src/arrayobject.c	2008-04-09 23:52:17 UTC (rev 5009)
@@ -3066,7 +3066,7 @@
             if ((vals[i] < 0) || (vals[i] >= self->dimensions[i])) {
                 PyErr_Format(PyExc_IndexError,
                              "index (%"INTP_FMT") out of range "\
-                             "(0<=index<=%"INTP_FMT") in dimension %d",
+                             "(0<=index<%"INTP_FMT") in dimension %d",
                              vals[i], self->dimensions[i], i);
                 return NULL;
             }
@@ -10139,7 +10139,7 @@
             if (indval < 0 || indval >= dimsize) {
                 PyErr_Format(PyExc_IndexError,
                              "index (%d) out of range "\
-                             "(0<=index<=%d) in dimension %d",
+                             "(0<=index<%d) in dimension %d",
                              (int) indval, (int) (dimsize-1),
                              mit->iteraxes[i]);
                 goto fail;



More information about the Numpy-svn mailing list