title: How do I stack vectors of different lengths in NumPy?
body: <p>How do I stack column-wise <code>n</code> vectors of shape <code>(x,)</code> where x could be any number?</p>
  
  <p>For example, </p>
  
  <pre><code>from numpy import *
  a = ones((3,))
  b = ones((2,))
  
  c = vstack((a,b)) # &lt;-- gives an error
  c = vstack((a[:,newaxis],b[:,newaxis])) #&lt;-- also gives an error
  </code></pre>
  
  <p><code>hstack</code> works fine but concatenates along the wrong dimension.</p>