python: changing jm/im to ext(j,h), ext(i,h) to comply with C++ and Fortran