Least Square Fitting Python