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

numpy-svn at scipy.org numpy-svn at scipy.org
Tue May 13 12:44:05 EDT 2008


Author: oliphant
Date: 2008-05-13 11:44:03 -0500 (Tue, 13 May 2008)
New Revision: 5161

Modified:
   trunk/numpy/core/defmatrix.py
Log:
Back-out matrix changes from trunk.  This breaks some test which need to be fixed differently.

Modified: trunk/numpy/core/defmatrix.py
===================================================================
--- trunk/numpy/core/defmatrix.py	2008-05-13 16:40:19 UTC (rev 5160)
+++ trunk/numpy/core/defmatrix.py	2008-05-13 16:44:03 UTC (rev 5161)
@@ -223,8 +223,6 @@
         return
 
     def __getitem__(self, index):
-        if isscalar(index):
-            return self.__array__()[index]
         self._getitem = True
 
         try:
@@ -304,6 +302,11 @@
         else:
             raise ValueError, "unsupported axis"
 
+    # Necessary because base-class tolist expects dimension
+    #  reduction by x[0]
+    def tolist(self):
+        return self.__array__().tolist()
+
     # To preserve orientation of result...
     def sum(self, axis=None, dtype=None, out=None):
         """Sum the matrix over the given axis.  If the axis is None, sum




More information about the Numpy-svn mailing list