get_method_opt¶
-
sherpa.ui.
get_method_opt
(optname=None)¶ Return one or all of the options for the current optimization method.
This is a helper function since the optimization options can also be read directly using the object returned by get_method.
- Parameters
optname (str, optional) – If not given, a dictionary of all the options are returned. When given, the individual value is returned.
- Returns
value
- Return type
dictionary or value
- Raises
sherpa.utils.err.ArgumentErr – If the
optname
argument is not recognized.
See also
get_method
Return an optimization method.
set_method
Change the optimization method.
set_method_opt
Change an option of the current optimization method.
Examples
>>> get_method_opt('maxfev') is None True
>>> mopts = get_method_opt() >>> mopts['maxfev'] is None True