title: Python numpy arrays - initializing first element?
body: <pre><code>diffs = np.empty([2, 3]) # 2D array 2x3.
  alldiffs = np.empty([2, 3, 1]) # 3D array 2x3xN. This creates 1st element. 
  
  for x in range(1000): 
      diffs = new_diffs(x)
      alldiffs = np.dstack((alldiffs, diffs))
  </code></pre>
  
  <p>I end up with 1001 <code>diffs</code> elements in <code>alldiffs</code> - instead of 1000. How would I initialize <code>alldiffs</code> without first element being automatically created?</p>