Fortran Reshape Function In Python Definition