import numpy as np txt = np.loadtxt("Matrix.csv",delimiter=',',dtype=int) x = np.array(txt) xx = x.reshape(-1,order='F') y = txt.reshape((4,16)) z = txt.reshape((4,4,4)) print(xx) print(y) print(z)