我目前正试图让Scipy的信号包发挥得很好,但我输入有麻烦。这是我的代码
import plotly.offline as pl
import plotly.graph_objs as go
import numpy as np
from scipy import signal
t = np.linspace(0, 10, 5001)
w = chirp(t, f0=12.5, f1=2.5, t1=10, method='logarithmic')
# Create a trace
trace = go.Scatter(
x = t,
y = w
)
data = [trace]
# Plot
pl.plot(data, filename='basic-line.html')
# or plot with: plot_url = py.plot(data, filename='basic-line')
这是它给我带来的错误
Traceback (most recent call last):
File "C:\python\My Code\numpy_test.py", line 8, in <module>
from scipy import signal
File "C:\python\lib\site-packages\scipy\signal\__init__.py", line 282, in <module>
from .bsplines import *
File "C:\python\lib\site-packages\scipy\signal\bsplines.py", line 12, in <module>
from scipy.special import comb, gamma
File "C:\python\lib\site-packages\scipy\special\__init__.py", line 629, in <module>
from .basic import *
File "C:\python\lib\site-packages\scipy\special\basic.py", line 14, in <module>
from ._ufuncs import (ellipkm1, mathieu_a, mathieu_b, iv, jv, gamma, psi, zeta,
ImportError: cannot import name 'ellipkm1'
我无法直接从PIP安装numpy或scipy,因此我使用了来自here的whl文件。
系统:
也许是构建问题?