title: numpy array equivalent for += operator
body: <p>I often do the following:</p>
  
  <pre><code>import numpy as np
  
  def my_generator_fun():
      yield x # some magically generated x
  
  A = []
  for x in my_generator_fun():
      A += [x]
  A = np.array(A)
  </code></pre>
  
  <p>Is there a better solution to this which operates on a numpy array from the start and avoids the creation of a standard python list?</p>
  
  <p>Note that the += operator allows to extend an empty and dimensionless array with an arbitrarily dimensioned array whereas np.append and np.concatenate demand for equally dimensioned arrays.</p>