get_method_opt
- sherpa.astro.ui.get_method_opt(optname: str | None = None) Any
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.
- optname
- Returns:
- value
dictionaryorvalue
- value
- Raises:
sherpa.utils.err.ArgumentErrIf the
optnameargument is not recognized.
See also
get_methodReturn an optimization method.
set_methodChange the optimization method.
set_method_optChange an option of the current optimization method.
Examples
>>> get_method_opt('maxfev') is None True
>>> mopts = get_method_opt() >>> mopts['maxfev'] is None True