Closed Jhsmit closed 7 years ago
Thanks for pointing this out. However, I think that apart from an annoying warning message this is harmless.
In your example where self.models.bounds
returns [(None, None), (None, None), (None, None)]
, it could have been replaced by just None
. But in the case where you set even just one, it has to be e.g. [(0.0, None), (None, None), (None, None)]
.
Every line in the code of scipy slsqp
is fine with this, except the offending line 341. But the end result is that the None
are always replaced by NaN
before being passed to the Fortran code in both scenarios of the if ... else ...
.
I agree that this warning doesn't actually provide any useful information, but I'm not sure we should just catch it in symfit
. Maybe this is something to fix in scipy
(or there is a reason they didn't). Any ideas?
I'd flag this as a wontfix. It looks to me as inconsistent input handling on scipy's side. If you want you (@tBuLi) can file an issue there.
If you fit using
ConstraintNumbericalLeastSquares
without specifying bounds:You get the following error message:
This is because
self.models.bounds
is in this case[(None, None), (None, None), (None, None)]
which does not evaluate toNone
when checked byscipy slsqp
(line 330). Its doesnt affect the fit in this case, but I can image it can cause problems.