def do_runs(nlist,t=0,f=wait, trials=2, runner=time_throughput):
    A = np.zeros((len(nlist),2))
    for i,n in enumerate(nlist):
        t1 = t2 = 0
        for _ in range(trials):
            time.sleep(.25)
            ts = runner(n,t,f)
            t1 += ts[0]
            t2 += ts[1]
        t1 /= trials
        t2 /= trials
        A[i] = (t1,t2)
        A[i] = n/A[i]
        print(n,A[i])
    return A
dataset/ETHPy150Open ipython/ipython-py3k/docs/examples/newparallel/demo/throughput.py/do_runs/original