[英]ImportError: cannot import name 'solve_ivp'
I don't understand why I have this error... Here is the code : 我不明白为什么会有这个错误...这是代码:
from scipy.integrate import solve_ivp
def exponential_decay(t, y): return -0.5 * y
sol = solve_ivp(exponential_decay, [0, 10], [2, 4, 8])
print(sol.t)
I'm using python 3.2.8 我正在使用python 3.2.8
It seems that scipy.integrate.solve_ivp()
was only introduced in scipy
versions > 0.19.1: 似乎
scipy.integrate.solve_ivp()
仅在scipy
版本> 0.19.1中引入的:
Documentation for version 0.19.1 and documentation for version 1.0.0 . 版本0.19.1的文档和版本1.0.0的文档。
In order to use that function you will have to upgrade your version of scipy
为了使用该功能,您将必须升级
scipy
版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.