Can you capture the output of ipython's magic methods? (timeit)

前端 未结 2 1130
既然无缘
既然无缘 2020-12-14 07:09

I want to capture and plot the results from 5 or so timeit calls with logarithmically increasing sizes of N to show how methodX() scales w

2条回答
  •  旧时难觅i
    2020-12-14 07:58

    PS: this is in an ipython notebook if that makes a diff.

    No it does not.

    On dev there is te %%capture cell magic. The other way would be to modify the timeit magic to return value instead of printing, or use the timeit module itself. Patches welcomed.

提交回复
热议问题