import numpy as np
# create a 2D array
a = np.array([[1,2,3], [4,5,6], [1,2,3], [4,5,6],[1,2,3], [4,5,6],[1,2,3], [4,5,6]])
print(a.shape)
# shape of a = (8,3)
b = np.reshape(a, (8, 3, -1))
# changing the shape, -1 means any number which is suitable
print(b.shape)
# size of b = (8,3,1)