optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.
Alternative: allow for specifying the bounds. This would require some thought on how to handle cases in which other bounds than 0, 1 are specified in the DataFrame.
What would you like to enhance and why? Is it related to an issue/problem?
The following code fails with the message
TypeError: only integer scalar arrays can be converted to a scalar index
.The problem seems to be that the bounds in the params DataFrame are not allowed (although they are also implemented by
ProbabilityConstraint
).Building
params
as follows works fine:Describe the solution you'd like
Catch exception and improve error message.
Alternative: allow for specifying the bounds. This would require some thought on how to handle cases in which other bounds than 0, 1 are specified in the DataFrame.