I would like to concatenate all numpy arrays (all same size) in a python dict to a new array.
dict = {'some_key_1':np.array([1,2,3,4]), 'some_key_2':np.array([2,3,4,5]), ...}
the result that I would like to see is:
result = np.array([[1,2,3,4],[2,3,4,5]])
whats the best way to do that?
Edit: Solution seems to be slightly different for python 2 and 3. The accepted answer solves it for python 3.
np.array(dict.values())? If you have a ragged number of elems that could be an issue.vstack, have a look :)