title: How to properly stack numpy arrays?
body: <p>I am having trouble understanding how data is being stacked in a numpy array and why I cannot match the last data that I added to an array with the last generated data. Here is a MWE:</p>
  <pre><code>import numpy as np
  np.random.seed(1)
  
  # build storage
  container = []
  
  # gen data
  x = np.random.random((13, 1, 64, 768))
  
  # add to container
  container.append(x)
  
  # gen data
  x2 = np.random.random((13, 1, 64, 768))
  
  # add to container
  container.append(x2)
  
  # convert to np array
  container = np.asarray(container)
  
  # reshape to [13, 2, 64, 768]
  container = container.reshape(13, 2, 64, 768)
  
  # check that the last generated data matches the last appended data
  assert np.all(x2.flatten() == container[:, -1, :, :].flatten()), 'not a match'
  </code></pre>