How to convert python dict to 3D numpy array?
<p>I have a python dict with n_keys where each value is a 2D array (dim1,dim2).
I want to transfer this into a 3D numpy array of (dim1,dim2,n_keys).
How can I do it fast without a lot of nested loops?</p>

<p>EDIT:
Example:</p>

<pre><code>featureMatrix = np.empty((len(featureDict.values()[0]),
       len(featureDict.values()[0][0,:]),
       len(featureDict.keys())))

for k,keys in enumerate(featureDict.keys()):
   value=featureDict[keys]
   for i in range(0,len(value[:,0]),1):
       for j in range(0,len(value[0,:]),1):
           featureMatrix[i,j,k]=value[i,j]
</code></pre>