method
matrix.flatten(self, order='C')
[source]
Return a flattened copy of the matrix.
All N
elements of the matrix are placed into a single row.
Parameters: 


Returns: 

>>> m = np.matrix([[1,2], [3,4]]) >>> m.flatten() matrix([[1, 2, 3, 4]]) >>> m.flatten('F') matrix([[1, 3, 2, 4]])
© 2005–2019 NumPy Developers
Licensed under the 3clause BSD License.
https://docs.scipy.org/doc/numpy1.17.0/reference/generated/numpy.matrix.flatten.html