我需要在没有定义输入的函数中集成一个函数。
from scipy import integrate
import numpy as np
def g():
g_value = 2*b+a
return (g_value)
def f():
f_value = integrate.quad (g, 0, 10)
return (f_value)
vector = np.arange (0, 100,1)
result = []
a=1
for i in range (0, len (vector)):
b=vector[i]
result.append (f())
print (result)
错误:g()接受0个位置参数,但给出了1个