np.ravel: Flatten a Numpy Array
If you want to get a 1-D array of a multi-dimensional array, try np.ravel(arr). You can either read the elements in the same row first or read the elements in the same column first.
Find an example of the np.ravel method above.
Link to the source code.





