Hi all, AFAIK, only the number of function and gradient evaluations are directly available via full_output=1. Is there a better way to get the number of iterations ? What I have used so far, is x_opt, allvec=optimize.fmin_cg(func,x_0,retall=1) print 'The number of iterations is',shape(allvec)[0]-1 Nils