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

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Aug 10 14:38:52 CDT 2006


Author: oliphant
Date: 2006-08-10 14:38:46 -0500 (Thu, 10 Aug 2006)
New Revision: 2988

Modified:
   trunk/numpy/core/src/arrayobject.c
Log:
Fix ticket #239

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2006-08-10 18:51:25 UTC (rev 2987)
+++ trunk/numpy/core/src/arrayobject.c	2006-08-10 19:38:46 UTC (rev 2988)
@@ -6933,8 +6933,8 @@
         else obj = PyTuple_GET_ITEM(s, 0);
         nd = object_depth_and_dimension(obj, max-1, newdims);
         for (i=1; i<size; i++) {
-                if (islist) obj = PyList_GET_ITEM(s, 0);
-                else obj = PyTuple_GET_ITEM(s, 0);
+                if (islist) obj = PyList_GET_ITEM(s, i);
+                else obj = PyTuple_GET_ITEM(s, i);
                 test_nd = object_depth_and_dimension(obj, max-1, test_dims);
                 if ((nd != test_nd) || 
                     (!PyArray_CompareLists(newdims, test_dims, nd))) {
@@ -8051,9 +8051,8 @@
                 }
         }
         else {
-                int isobject;
+                int isobject=0;
                 if (flags & UPDATEIFCOPY) goto err;
-                isobject = 0;
                 if (newtype == NULL) {
                         newtype = _array_find_type(op, NULL, MAX_DIMS);
                 }



More information about the Numpy-svn mailing list