Open ivergara opened 8 years ago
The parameter is a function-descriptor. Implementing min/max would have to be done in the setter, which would mean that the optimizer is not aware but would get and exception when trying to go to invalid numbers. This is a possible solution.
Alternatively, the parameter descriptor could be, eventually, promoted to a class and have min/max as attributes that the optimizer could check once when setting up. This would avoid having to make the parameter setter more complex than what it is now. lmfit implements a parameter class, but they have somewhat different requirements as they aim to provide on the fly functions to fit to data.
Add optional keyword arguments to the parameters to define min and max values that the optimization routines should be aware of.