【发布时间】:2019-07-19 11:04:07
【问题描述】:
这是我正在使用的代码:
import matplotlib.pyplot as plt
from scipy import integrate
import numpy as np
def g(t):
return integrate.quad(t, 0, t)
def f(t):
return t ** 3 - g(t)
t1 = np.arange(-5, 5, 0.1)
plt.figure(1)
plt.subplot(211)
plt.plot(t1, f(t1))
plt.show()
这里是我得到的错误信息:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
【问题讨论】:
标签: python plot numerical-integration