BUG: scipy.optimize._differentialevolution
incorrectly converted np.inf values to self.bounds
when using scipy.optimized.Bounds
#18953
Labels
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
scipy.optimize
Milestone
Describe your issue.
Hello scipy team,
thank you for providing such an amazing package. While working with your differential evolution algorithm, I experienced a conversion problem with the optimization variable bounds when working with
np.inf
values together withscipy.optimize.Bounds
. In line 680 of the filescipy.optimized._differentialevolution
we havewhich results in
nan
-values inself.limits
, caused by line 400-401 inscipy.optimize._bounds
One fix would probably be to substitute the lines above by
Thank you very much in advance :)
Reproducing Code Example
Error message
SciPy/NumPy/Python version and system information
The text was updated successfully, but these errors were encountered: