[Numpy-svn] r3264 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Oct 5 14:02:35 CDT 2006


Author: oliphant
Date: 2006-10-05 14:02:34 -0500 (Thu, 05 Oct 2006)
New Revision: 3264

Modified:
   trunk/numpy/core/records.py
Log:
Fix ticket #322

Modified: trunk/numpy/core/records.py
===================================================================
--- trunk/numpy/core/records.py	2006-10-05 18:53:05 UTC (rev 3263)
+++ trunk/numpy/core/records.py	2006-10-05 19:02:34 UTC (rev 3264)
@@ -301,11 +301,12 @@
     d0 = descr[0].shape
     nn = len(d0)
     if nn > 0:
-        shape = shape[nn:]
+        shape = shape[:-nn]
         
     for k, obj in enumerate(arrayList):
         nn = len(descr[k].shape)
-        if obj.shape[nn:] != shape:
+        testshape = obj.shape[:len(obj.shape)-nn]
+        if testshape != shape:
             raise ValueError, "array-shape mismatch in array %d" % k
         
     _array = recarray(shape, descr)



More information about the Numpy-svn mailing list