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

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Oct 23 11:30:37 CDT 2006


Author: stefan
Date: 2006-10-23 11:30:18 -0500 (Mon, 23 Oct 2006)
New Revision: 3380

Modified:
   trunk/numpy/lib/index_tricks.py
Log:
In ix_, do not modify shape of input array.


Modified: trunk/numpy/lib/index_tricks.py
===================================================================
--- trunk/numpy/lib/index_tricks.py	2006-10-23 11:42:09 UTC (rev 3379)
+++ trunk/numpy/lib/index_tricks.py	2006-10-23 16:30:18 UTC (rev 3380)
@@ -78,7 +78,7 @@
         if issubclass(new.dtype.type, _nx.bool_):
             new = new.nonzero()[0]
         baseshape[k] = len(new)
-        new.shape = tuple(baseshape)
+        new = new.reshape(tuple(baseshape))
         out.append(new)
         baseshape[k] = 1
     return tuple(out)



More information about the Numpy-svn mailing list