I am trying to change a two dimensional array to one dimensional, my code is like this:
x = np.array([[1, 2, 4], [3, 4], [1,2,3,4,5,6,7]])
x = x.flatten()
however, I found that flatten function works well on
x = np.array([[1, 2], [3, 4]])
but it does not work on
x = np.array([[1, 2, 4], [3, 4], [1,2,3,4,5,6,7]])
could anyone help me to change
np.array([[1, 2, 4], [3, 4], [1,2,3,4,5,6,7]])
to
np.array([[1, 2, 4, 3, 4, 1,2,3,4,5,6,7])
thank you