Closed Harveyt47 closed 4 years ago
I believe it is a problem with the bounds. The initial bound in the maximize
function is 1e-05. This is causing the error. the output below illustrates this.
changing the upper bound to 1e-04 fixes the bug.
I am unsure why the minimize_scalar
function can not take bounds so close to one another.
Hi @jstac , I believe there may be a floating point error occurring within scipy function.
I think that the best fix for now is to change the minimum of the grid from 1e-5 to 1e-4.
Thanks @Harveyt47, good detective work.
Please put in a PR which fixes this issue using the technique you propose and ask someone to review it.
There is an error occurring in the optimal growth lecture. I believe that this error is originating from the
minimize_scalar
function in scipy which is used in themaximize
function in the optgrowth lecture. I also believe that themethod='bounded'
variable in theminimize_scalar
function is causing this error.When I remove
method='bounded'
from being called I get the following output This output is obviously not optimal.