0

我有以下代码

def f(x, y, ro):
    return x*y*ro

def bounds_y():
    return [0, 0.5]

def bounds_x(y):
    return [0, 1-2*y]

scipy.integrate.nquad(f, [bounds_x, bounds_y, [0.5] ], args= [0.5])

没有参数,代码就可以工作。但是当我添加参数时,我收到以下错误

bounds_y() 接受 0 个位置参数,但给出了 1 个

为什么会出现这种情况以及如何解决?

谢谢!

4

0 回答 0