sympy的diff函数求导
大佬们,我用sympy里的diff函数对一个十阶多项式求导,竟然耗时20秒
start = time.time()
x = symbols('x')
w =
f = 0
length = len(w)
for i in range(length):
f += w*x**i
ds_1 = diff(f,x,1)
zhu =solve(ds_1, x)
end = time.time()
print(ds_1)
print(zhu)
print('求导耗时%f秒'%(end - start))
页:
[1]