show_options#
- scipy.optimize.show_options(solver=None, method=None, disp=True)[source]#
Show documentation for additional options of optimization solvers.
These are method-specific options that can be supplied through the
options
dict.- Parameters:
- solverstr
Type of optimization solver. One of βminimizeβ, βminimize_scalarβ, βrootβ, βroot_scalarβ, βlinprogβ, or βquadratic_assignmentβ.
- methodstr, optional
If not given, shows all methods of the specified solver. Otherwise, show only the options for the specified method. Valid values corresponds to methodsβ names of respective solver (e.g., βBFGSβ for βminimizeβ).
- dispbool, optional
Whether to print the result rather than returning it.
- Returns:
- text
Either None (for disp=True) or the text string (disp=False)
Notes
The solver-specific methods are:
scipy.optimize.minimize_scalar
scipy.optimize.quadratic_assignment
Examples
We can print documentations of a solver in stdout:
>>> from scipy.optimize import show_options >>> show_options(solver="minimize") ...
Specifying a method is possible:
>>> show_options(solver="minimize", method="Nelder-Mead") ...
We can also get the documentations as a string:
>>> show_options(solver="minimize", method="Nelder-Mead", disp=False) Minimization of scalar function of one or more variables using the ...