import numpy as np a1 = np.array([i for i in range(1,5)]) a2 = a1.reshape((2,2)) print(f"a1 = {a1} " f"a2 = {a2} " )