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

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Aug 15 01:25:55 CDT 2006


Author: oliphant
Date: 2006-08-15 01:25:51 -0500 (Tue, 15 Aug 2006)
New Revision: 3025

Modified:
   trunk/numpy/core/src/arrayobject.c
Log:
Handle 0-d case in IterAllButAxis

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2006-08-15 00:28:18 UTC (rev 3024)
+++ trunk/numpy/core/src/arrayobject.c	2006-08-15 06:25:51 UTC (rev 3025)
@@ -8626,6 +8626,8 @@
         it = (PyArrayIterObject *)PyArray_IterNew(obj);
         if (it == NULL) return NULL;
 
+        if (PyArray_NDIM(obj)==0) 
+                return (PyObject *)it;
         if (*inaxis < 0) {
                 int i, maxaxis=0;
                 intp maxdim=PyArray_DIM(obj,0);



More information about the Numpy-svn mailing list