I have tried to set limits on parameters using iminuit with the example code:
import iminuit
def func(x,y):
fun = 2*x**2 + 3*y + 5
return fun
m = iminuit.Minuit(func, x=1, y=1, limit_x=(0,100), limit_y=(0,50))
What I get is the error message
/usr/local/lib/python3.6/dist-packages/iminuit/minuit.py in _make_init_state(pos2var, args, kwds)
1537 if kw not in pos2var:
1538 raise RuntimeError(
-> 1539 f"{kw} is not one of the parameters [{' '.join(pos2var)}]"
1540 )
1541 nargs = len(kwds)
RuntimeError: limit_x is not one of the parameters [x y]
It is weird because the documentation shows the inclusion of limits in this way.
I am particularly interested in a minimization of a more complex function, with 6 or more parameters and it is important to specify the parameter space of 2 of them.