fix non int index warning after normal division in python3