I have been using the following code:
options = {\'maxiter\':50, \'disp\':True} res = optimize.minimize( fun=lrCostFunction, x