Stack and reshape Numpy array

Given a 4 2d array as below

import numpy as np
    
t1=np.array([[0,0,1],[0,0,1],[1,1,0]])
t2=np.array([[0,1,0],[1,0,1],[0,1,0]])
t3=np.array([[0,0,1],[0,0,0],[1,0,0]])
t4=np.array([[0,1,1],[1,0,1],[1,1,0]])

May I know how to combine and reshape it to get the output as below

[[[0. 0. 0. 0.]
      [0. 1. 0. 1.]
      [1. 0. 1. 1.]]
     [[0. 1. 0. 1.]
      [0. 0. 0. 0.]
      [1. 1. 0. 1.]]
     [[1. 0. 1. 1.]
      [1. 1. 0. 1.]
      [0. 0. 0. 0.]]]

Answer

In [66]: t1=np.array([[0,0,1],[0,0,1],[1,1,0]])
    ...: t2=np.array([[0,1,0],[1,0,1],[0,1,0]])
    ...: t3=np.array([[0,0,1],[0,0,0],[1,0,0]])
    ...: t4=np.array([[0,1,1],[1,0,1],[1,1,0]])
In [67]: t1.shape
Out[67]: (3, 3)
In [68]: np.stack((t1,t2,t3,t4),axis=2)
Out[68]: 
array([[[0, 0, 0, 0],
        [0, 1, 0, 1],
        [1, 0, 1, 1]],

       [[0, 1, 0, 1],
        [0, 0, 0, 0],
        [1, 1, 0, 1]],

       [[1, 0, 1, 1],
        [1, 1, 0, 1],
        [0, 0, 0, 0]]])

Transpose of the array (also np.stack((), axis=0)) produces the same thing, but that is only because each of the (3,3) arrays are symmetric.

In [70]: np.array((t1,t2,t3,t4))
Out[70]: 
array([[[0, 0, 1],
        [0, 0, 1],
        [1, 1, 0]],

       [[0, 1, 0],
        [1, 0, 1],
        [0, 1, 0]],

       [[0, 0, 1],
        [0, 0, 0],
        [1, 0, 0]],

       [[0, 1, 1],
        [1, 0, 1],
        [1, 1, 0]]])