我正在使用Python35
。我想使用this question中使用的mpmath.invertlaplace
函数。不幸的是我遇到了一些麻烦:
>>> 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使用?我在这里错过了什么吗?我觉得这应该有用......