depth(axis=2)
a = np.array([[1,2], [3,4]]) b = np.array([[5,6], [7,8]]) np.dstack((a, b)) # (2,2) + (2,2) → (2,2,2) # [[[1,5], [2,6]], # [[3,7], [4,8]]]
Seonglae Cho
Seonglae Choa = np.array([[1,2], [3,4]]) b = np.array([[5,6], [7,8]]) np.dstack((a, b)) # (2,2) + (2,2) → (2,2,2) # [[[1,5], [2,6]], # [[3,7], [4,8]]]