Scipy Optimization Example In Python