0
我正在使用Python35
。我想使用this question中使用的mpmath.invertlaplace
函数。不幸的是我有一些麻烦:在python中找不到mpmath包
>>> import mpmath as mp
>>> import numpy as np
>>> def f(s):
return(1/s)
>>> t = np.linspace(0.01,0.5,10)
>>> G = []
>>> for i in range(0,10):
G.append(mp.invertlaplace(f, t[i], method = 'dehoog', degree = 18))
Traceback (most recent call last):
File "<pyshell#254>", line 2, in <module>
G.append(mp.invertlaplace(f, t[i], method = 'dehoog', degree = 18))
AttributeError: module 'mpmath' has no attribute 'invertlaplace'
此功能是否最近添加为Python35拿起?我在这里错过了什么吗?我觉得这应该工作...
更新包到最新版本? –
我正在使用pip ...我该怎么做? – user32882
'pip install mpmath --upgrade'? –