Scipy Optimize Least Squares Mean