SciPy (>= v1.10.1) will complain about this line
|
results = minimize_scalar(fun, method='Brent', bracket=(1, 2), bounds=[1, 100000]) |
because it now does not support using
Brent when a bound is given (
scipy source)
if bounds is not None and meth in {'brent', 'golden'}:
message = f"Use of `bounds` is incompatible with 'method={method}'."
raise ValueError(message)
Can switch to method='Bounded' to bypass this issue.