title: How do I convert an array of arrays into a multi-dimensional array in Python?
body: <p>I have a NumPy array (of length X) of arrays, all of which are of the same length (Y), but which has type "object" and thus has dimension (X,). I would like to "convert" this into an array of dimension (X, Y) with the type of the elements of the member arrays ("float").</p>
  
  <p>The only way I can see to do this is "manually" with something like</p>
  
  <pre><code>[x for x in my_array]
  </code></pre>
  
  <p>Is there a better idiom for accomplishing this "conversion"?</p>
  
  <hr>
  
  <p>For example I have something like:</p>
  
  <pre><code>array([array([ 0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.]),
         array([ 0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.]),
         array([ 0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.]), ...,
         array([ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.]),
         array([ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.,  0.,  0.]),
         array([ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.])], dtype=object)
  </code></pre>
  
  <p>which has <code>shape</code> (X,) rather than (X, 10).</p>