title: NumPy Stack multidimensional arrays
body: <p>I have 3 nD arrays as follows</p>
  
  <pre><code>x = [[1, 2, 3],  
       [4, 5, 6],  
       [7, 8, 9]]    
  
  
  y = [[10, 11, 12],
       [13, 14, 15],
       [16, 17, 18]]
  
  z = [[ 19,  20,  21],
       [ 22,  23,  24],
       [ 25,  26,  27]]
  </code></pre>
  
  <p>Without using for loop, I am trying to append every 2x2 matrix elements together such that</p>
  
  <pre><code>a1 = [[1,2]
        [4,5]]
  
  a2 = [[10,11], 
        [13,14]]
  
  a3 = [[19,20],
        [22,23]]
  
  should append to
  
  a = [[1,10,19],[2,11,20],[4,13,22],[5,14,23]]
  
  Please note, the NxN matrix will always be N = j - 1 where j is x.shape(i,j)
  
  Similarly for other 2x2 matrices, the arrays are as follows
  
  b = [[2,11,20],[3,12,21],[5,14,23],[6,15,24]]
  c = [[4,13,22],[5,14,23],[7,16,25],[8,17,26]]
  d = [[5,14,23],[6,15,24],[8,17,26],[9,18,27]]
  </code></pre>
  
  <p>For large datasets, the for loop impacts runtime so I am trying to see if there is a way using NumPy stacking techniques</p>