我想通过perfplot
展示一些使用多个参数的函数的性能,但我不知道如何做到这一点(我对perfplot
不太熟悉).一个说broadcast all args to just x,但我还不知道如何使用它.假设我们有以下功能:
from scipy.ndimage import zoom
import numpy as np
f = 5
n = 3
arr = np.random.random_integers(0, 1, (f, f))
def scipy_zoom(arr, n):
return zoom(arr, n)
def numpy_rep(arr, n):
return arr.repeat(n, 0).repeat(n, 1)
f
和n
的变化都需要判断,似乎最好分别绘制它们,即一旦f
不变,n
变化,反之亦然.我不知道如果3D perfplot人能被策划出来,这会有多容易理解(this will be useful if be shown in the answers, but not the main aim of this question).