Make sure nvalues is int and not float for Python 3