python - ImportError:无法导入名称“solve_ivp”
问题描述
我不明白为什么我有这个错误......这是代码:
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)
我正在使用 python 3.2.8
解决方案
似乎scipy.integrate.solve_ivp()
只在scipy
> 0.19.1 版本中引入:
为了使用该功能,您必须升级您的版本scipy
推荐阅读
- amazon-web-services - 如何在启用默认 EBS 加密的情况下使用 Beanstalk?
- c# - 从 Web 项目中排除了一个联系我们的 aspx 页面,但仍收到电子邮件?
- redux - Create-React-App Jest 失败:测试套件必须包含至少一个测试 - 但确实如此
- reactjs - 如何在 React 中动态导入两个 CSS 框架?
- php - 内存限制耗尽flysystem/src/Util/MimeType.php,如何找到文件路径?
- javascript - $refs 会扰乱插值吗?
- python-3.x - Sanic 如何为测试应用加载配置?
- java - 类可以通过接口实现另一个类吗?
- uwp - UWP Win 10 XAML 超级/子脚本呈现问题
- javascript - 如何有效地链接 3 个 ajax 调用,其中一个 ajax 调用提供其他两个 ajax 调用?