I tend to use np.array to stack arrays rather than np.vstack, as I find it does what I want with higher dimensional arrays. However, I was quite surprised to see a large speed difference:
In : import numpy as np
In : N = 1e6
In : M = 10
In : l = [np.random.random(N) for _ in range(M)]
In : %timeit np.vstack(l) 10 loops, best of 3: 82.7 ms per loop
In : %timeit np.array(l) 10 loops, best of 3: 822 ms per loop
I can't find the reasons for this speed difference. Also, I don't see what is the correct way to get the behavior I want without paying the extra speed cost.