#1892: scipy.optimize.brute -- minimum value is mapped to integer without obvious
reason
-------------------------+--------------------------------------------------
Reporter: jgehrcke | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 0.12.0
Keywords: |
-------------------------+--------------------------------------------------
Hello,
As documented, scipy.optimize.brute returns -- among others -- the
"function value at minimum". Unexpectedly, but still documented, this
value is always of integer type.
So, for example if x_min was identified by the brute force optimization
function to be the minimum location and f(x_min) really is 4.8, then fval
is returned as 4.
This appears to be quite strange. What is the reason for this behavior?
Why not return fval=4.8 as float?
One has to work around the current behavior by calling f(x_min) one more
time after using brute.
Cheers,
Jan-Philip
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1892>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.