Notebook
r = optimize.fmin_cg(f, theta0, g, maxiter = 200, disp=1, ) optimal_theta = r[0]