title: Numpy : Add a 1d array (row) to an empty 2d array in Numpy Python
body: <p>I don't know the number of rows and columns of a 2d array (<code>a</code>) I need in advance:</p>
  
  <pre><code>a = np.empty( (0,0), dtype=np.uint8 )
  a.ndim
  2
  </code></pre>
  
  <p>I managed to convert each line I read from a file to an 1d array of bytes called <code>line</code></p>
  
  <p>I want to add/append each line to <code>a</code>, so I tried :</p>
  
  <p><code>np.vstack( (a,line) )</code></p>
  
  <p>but I get :
  <code>ValueError: all the input arrays must have same number of dimensions</code></p>
  
  <p>And if I call <code>a=np.append(a,line)</code>, the number of dimensions becomes <code>1</code></p>
  
  <p>Can you help ?</p>