[SciPy-Dev] PR #196: simplification of optimization wrappers

Denis Laxalde denis at laxalde.org
Thu Apr 19 12:30:16 EDT 2012


Gyro Funch wrote:
> I am a user of various SciPy optimization functions. Since I am
> interested primarily in 'x', I'm not sure of the benefit of burying
> this information in a dictionary. Perhaps this can be clarified.

'x' is not that « buried », you can easily access it as sol.x. So, if
you only want 'x', do:

  x = minimize(fun, x0, [jac, constraints], options).x

(Note that there's no 'x' attribute defined. It is currently named
'solution'.)

-- 
Denis



More information about the SciPy-Dev mailing list