change scipy.optimize fitting tol