title: How to sequentially fill a 3d matrix in python?
body: <p>I have an nd-array 'A' of dimensions (n, m, p), and I have a list of length n*m that contains arrays a1,a2,.. each of the arrays being of length p. What I am trying to do is to sequentially (by rows) fill 'A' using the arrays 'a'. Consider for instance the following example:</p>
  
  <pre><code>A = np.empty ((2,3,4))
  
  a1 = np.array([1,2,3,0])
  a2 = np.array([3,4,6,9])
  a3 = np.array([9,5,8,5])
  a4 = np.array([1,5,4,2])
  a5 = np.array([9,7,0,5])
  a6 = np.array([4,3,2,1])
  lst = [a1, a2, a3, a4, a5, a6]
  </code></pre>
  
  <p>I am trying to find some way to do </p>
  
  <pre><code>A = DoSomething(A, lst)
  print(A)
  array([[[ 1.,  2.,  3.,  0.],
          [ 3.,  4.,  6.,  9.],
          [ 9.,  5.,  8.,  5.]],
         [[ 1.,  5.,  4.,  2.],
          [ 9.,  7.,  0.,  5.],
          [ 4.,  3.,  2.,  1.]]])
  </code></pre>
  
  <p>So this way <code>A[0, 0, :]=a1, A[0, 1, :]=a2</code> and so on.</p>