Jupyter Lab Instruction Note (使用笔记)
Magic Commands 魔法命令
通常由%
和%%
起头
例如:
使用%matplotlib
使得matplotlib能够在Jupyter中交互使用;
使用%pdb
debugging代码(参考pdb);
使用timeit
查看函数运行时间:%timeit function()
;
使用%%timeit
查看整个单元的运行时间。
具体而言:
%matplotlib inline
使得直接在Jupyter中渲染图片,如果需要渲染高分辨率的图片,使用%config InlineBackend.figure_format = 'retina'
Comments are closed.