How to stack all columns in a 2-dimensional Numpy array into a 1-dimensional array.
I.e. I have:
x = np.array([[1, 3, 5],[2, 4, 6]])
And I want to get:
np.array([1, 2, 3, 4, 5, 6])
Is there a way to achieve this without a loop or list comprehension?
ybefore the loop is float dtypenp.concatenate([x[:,i] for i in range(3)])