power law transformation in python