【发布时间】:2020-08-19 03:46:27
【问题描述】:
我正在运行比较两个不同函数f1 和f2 的性能的脚本。它不能通过equality_check 并引发AssertionError: Equality check failure. (f1, f2)。如何访问失败的函数的参数和输出?
perfplot.show(
setup=lambda n: np.random.randint(0, n, size = n),
kernels=[f1, f2],
n_range=[2 ** k for k in range(3, 14)],
logx=True,
logy=True,
xlabel="n",
equality_check=lambda x, y: np.array_equal(x, y)
)
【问题讨论】:
标签: python performance perfplot