set_method_opt¶
-
sherpa.ui.set_method_opt(optname, val)¶ Set an option for the current optimization method.
This is a helper function since the optimization options can also be set directly using the object returned by get_method.
Parameters: - optname (str) – The name of the option to set. The get_method and get_method_opt routines can be used to find out valid values for this argument.
- val – The new value for the option.
Raises: sherpa.utils.err.ArgumentErr– If theoptnameargument is not recognized.See also
get_method()- Return an optimization method.
get_method_opt()- Return one or all options of the current optimization method.
set_method()- Change the optimization method.
Examples
Change the
maxfevparameter for the current optimizer to 2000.>>> set_method_opt('maxfev', 2000)