diff options
author | alex <argriffi@ncsu.edu> | 2014-07-31 18:49:19 -0400 |
---|---|---|
committer | alex <argriffi@ncsu.edu> | 2014-07-31 18:49:19 -0400 |
commit | 650d4ef1b16c48fe443c3781b27e0f942be3ceb5 (patch) | |
tree | ac24a3255d0d6db162daca5f3df93f1b745601c1 /numpy/matrixlib/defmatrix.py | |
parent | b6ba4addafc0782fc3219b73fa67ec8f3f37adaa (diff) | |
download | numpy-650d4ef1b16c48fe443c3781b27e0f942be3ceb5.tar.gz |
DOC: clarify matrix flatten docstring
Diffstat (limited to 'numpy/matrixlib/defmatrix.py')
-rw-r--r-- | numpy/matrixlib/defmatrix.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/matrixlib/defmatrix.py b/numpy/matrixlib/defmatrix.py index dd6221670..1c7e29d53 100644 --- a/numpy/matrixlib/defmatrix.py +++ b/numpy/matrixlib/defmatrix.py @@ -457,7 +457,9 @@ class matrix(N.ndarray): # To update docstring from array to matrix... def flatten(self, order='C'): """ - Return a copy of the matrix collapsed into one dimension. + Return a flattened copy of the matrix. + + All `N` elements of the matrix are placed into a single row. Parameters ---------- @@ -469,7 +471,8 @@ class matrix(N.ndarray): Returns ------- y : matrix - A copy of the input matrix, flattened to one dimension. + A copy of the matrix, flattened to a `(1, N)` matrix where `N` + is the number of elements in the original matrix. See Also -------- |