summaryrefslogtreecommitdiff
path: root/numpy/core/defmatrix.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-10-23 23:08:00 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-10-23 23:08:00 +0000
commit5817ed4ec7fa662f70a1401b521a8a6d785fe51f (patch)
treeea45735080e6f8aa8b7f0090a9f008e1c2bfaa8c /numpy/core/defmatrix.py
parent4ea6483ccf7c9568dc8a487114590be9e4771fb4 (diff)
downloadnumpy-5817ed4ec7fa662f70a1401b521a8a6d785fe51f.tar.gz
Add .A1 property to matrices to be equivalent to .__array__().ravel()
Diffstat (limited to 'numpy/core/defmatrix.py')
-rw-r--r--numpy/core/defmatrix.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py
index 26ffb7833..becfa74c9 100644
--- a/numpy/core/defmatrix.py
+++ b/numpy/core/defmatrix.py
@@ -289,7 +289,10 @@ class matrix(N.ndarray):
def getA(self):
return self.__array__()
-
+
+ def getA1(self):
+ return self.__array__().ravel()
+
def getT(self):
return self.transpose()
@@ -301,6 +304,7 @@ class matrix(N.ndarray):
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")