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

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Oct 23 18:08:02 CDT 2006


Author: oliphant
Date: 2006-10-23 18:08:00 -0500 (Mon, 23 Oct 2006)
New Revision: 3386

Modified:
   trunk/numpy/core/defmatrix.py
Log:
Add .A1 property to matrices to be equivalent to .__array__().ravel()

Modified: trunk/numpy/core/defmatrix.py
===================================================================
--- trunk/numpy/core/defmatrix.py	2006-10-23 22:41:47 UTC (rev 3385)
+++ trunk/numpy/core/defmatrix.py	2006-10-23 23:08:00 UTC (rev 3386)
@@ -289,7 +289,10 @@
 
     def getA(self):
         return self.__array__()
-
+    
+    def getA1(self):
+        return self.__array__().ravel()
+    
     def getT(self):
         return self.transpose()
 
@@ -301,6 +304,7 @@
 
     T = property(getT, None, doc="transpose")
     A = property(getA, None, doc="base array")
+    A1 = property(getA1, None, doc="1-d base array")
     H = property(getH, None, doc="hermitian (conjugate) transpose")
     I = property(getI, None, doc="inverse")
 



More information about the Numpy-svn mailing list