Fix power of units for Python3

Replace division by dict loop