hgrecco / numbakit-ode

Leveraging numba to speed up ODE integration
Other
68 stars 3 forks source link

scipy.optimize.zeros is deprecated #26

Closed duynguyenms2011 closed 2 years ago

duynguyenms2011 commented 2 years ago

I installed the package from GitHub but got a following error:

AttributeError: scipy.optimize.zeros is deprecated and has no attribute _ECONVERR. Try looking in scipy.optimize instead.

maurosilber commented 2 years ago

Try again, it should work now.

maurosilber commented 2 years ago

I could reproduce that error too, but the latest commits fix them, at least in my machine. Did you pull (and install again) the new changes?

What version of numbakit-ode do you have? When you opened the issue, it should have installed the version numbakit-ode-0.5.dev41+g3b2ce01. Now, it should install numbakit-ode-0.5.dev44+g0c8d49b. You can install/upgrade directly from GitHub with:

pip install git+https://github.com/hgrecco/numbakit-ode

If you have the "dev44" version, and still get the same error message, could you also tell me which SciPy version you have installed?

On Thu, Mar 3, 2022 at 3:04 PM duynguyenms2011 @.***> wrote:

It's not working. Here are the steps that I took: 1 clone the repo 2 pip install . in the main directory 3 import nbkode 4 get an error AttributeError: scipy.optimize.zeros is deprecated and has no attribute _ECONVERR. Try looking in scipy.optimize instead.

Please advise. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/hgrecco/numbakit-ode/issues/26#issuecomment-1058333345, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFTXWYEPBGK4YZQL7ZM7SDU6D5MDANCNFSM5PY4R7CA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>

duynguyenms2011 commented 2 years ago

I've figured it out. Thank you so much sir!

By the way, I am looking for a documentation regarding RK45 acceptable parameters, but cannot find one. Particularly, I am looking for the similar options as scipy.solve_ivp: t_eval, atol, rtol.

Would you mind giving me a list of acceptable parameters for nbkode.RungeKutta45 please?

Thank you so much!

maurosilber commented 2 years ago

For parameters such as atol and rtol, all variable step methods accept the parameters shown here: https://github.com/hgrecco/numbakit-ode/blob/0c8d49be0a06204b5a680d0db82fe086cf301258/nbkode/core.py#L664-L674

With respect to t_eval, we use a different approach, which you can read in the docs: https://numbakit-ode.readthedocs.io/en/latest/migration.html

On Thu, Mar 3, 2022 at 5:17 PM Duy Nguyen @.***> wrote:

I've figured it out. Thank you so much sir!

By the way, I am looking for a documentation regarding RK45 acceptable parameters, but cannot find one. Particularly, I am looking for the similar options as scipy.solve_ivp: t_eval, atol, rtol.

Would you mind giving me a list of acceptable parameters for nbkode.RungeKutta45 please?

Thank you so much!

— Reply to this email directly, view it on GitHub https://github.com/hgrecco/numbakit-ode/issues/26#issuecomment-1058444917, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFTXWYPWWDDP2R2MHJ4SCDU6EM5NANCNFSM5PY4R7CA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>