importnumpyasnparray=np.arange(8)print("Original array : \n",array)#shapearraywith2rowsand4columnsarray=np.arange(8).reshape(2,4)print("\narray reshaped with 2 rows and 4 columns : \n",array)#shapearraywith2rowsand4columnsarray=np.arange(8).reshape(4,2)print("\narray reshaped with 2 rows and 4 columns : \n",array)#Constructs3Darrayarray=np.arange(8).reshape(2,2,2)print("\nOriginal array reshaped to 3D : \n",array)