Return a copy of the array collapsed into one dimension.
Parameters : | order : {‘C’, ‘F’, ‘A’}, optional
|
---|---|
Returns : | y : ndarray
|
Examples
>>> a = np.array([[1,2], [3,4]])
>>> a.flatten()
array([1, 2, 3, 4])
>>> a.flatten('F')
array([1, 3, 2, 4])