title: Dynamic numpy array in python
body: <p>I am trying to create an numpy array(lets say A) of shape (a, b, 1, d) where d is unknown and changes according to the input I have. I have another array (lets say B) with shape (a, b, 1, 1). I want to append the values of B to A from the for loop. In matlab it can be easily done with:</p>
  
  <pre><code>a = zeros(a, b, 1, 1)
  count = 0
  for i = 1 : something
      ai = array of shape (a, b, 1, 1)
      count += 1
      a(:, :, 1, count) = ai
  end
  </code></pre>
  
  <p>How can I achieve similar result in python ?</p>