Christian Staudt Christian Staudt - 1 year ago 165
Python Question

Jupyter/Ipython Notebook: How to time multiline segment of code?


magic command allows you to conveniently time a single line of Python code.

Can I also time a block of code without wrapping it in a function first? Is there an equivalent function that times an entire cell?

Answer Source

Cell magics starts with %% while line magics starts with %.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download