title: Adding a row to a numpy array: 'numpy.ndarray' object has no attribute 'append' or 'vstack'
body: <p>I have a 2D numpy array to which I want to append rows at the end.</p>
  
  <p>I've tried both <code>append</code> and <code>vstack</code> but either way I get an error like:</p>
  
  <pre><code>'numpy.ndarray' object has no attribute 'vstack'
  </code></pre>
  
  <p>or it says there no attribute <code>append</code>...</p>
  
  <p>This is my code:</p>
  
  <pre><code>g = np.zeros([m, no_features])
  # then somewhere in the middle of a for-loop I build a new array called temp_g
  # and try to append it to g. temp_g is a 2D array
  g.vstack((temp_g,g))
  </code></pre>
  
  <p>I did <code>g.append(temp_g)</code> but no difference, I get the same error saying there's no such attribute.</p>
  
  <p>Is there something wrong in the way I first declared the array <code>g</code>? </p>