Make Hertz fit work with Python 3