How to convert a array of dimension 3 * 200 * 120 into a 1*600 *120 in python?
Question: I have an array like this:

`[ array([[2,3,4,5,6,10]]) array([[7,3,9,1,2,3]]) array([[3,7,34,345,22,1]])
]`

I would like to convert the above array as follows:

`[[2 3 4 5 6 10] [7 3 9 1 2 3] [ 3 7 34 345 22 1]]`


Answer: Use
[`np.vstack`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html):

    
    
    import numpy as np
    a = [ np.array([[2,3,4,5,6,10]]), np.array([[7,3,9,1,2,3]]), np.array([[3,7,34,345,22,1]]) ]
    np.vstack(a)
    # array([[  2,   3,   4,   5,   6,  10],
    #        [  7,   3,   9,   1,   2,   3],
    #        [  3,   7,  34, 345,  22,   1]])
    

As @imaluengo pointed out in the comments: If you want to have a 3d array
you'd need to add another _empty_ dimension to your array:

    
    
    res = np.vstack(a)
    res3d = res[None, ...]            # option 1 - ellipsis
    res3d = res[None, :, :]           # option 2
    res3d = np.expand_dims(res, 0)    # option 3 - using np.expand_dims
    

Your output looked like a list so you could use `.tolist()` afterwards - but
you would discard the advantages of numpy arrays.

