简体   繁体   English

在Ipython中的库前%符号

[英]% sign before library in Ipython

Does anyone know what the % sign in front of a library means in Ipython? 有谁知道在Ipython中图书馆前面的百分号是什么意思?
In a caffe tutorial there are the following first lines of a python script: 在caffe教程中,以下是python脚本的第一行:

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

What does the third row %matplotlib inline do here? 第三行%matplotlib inline在这里做什么?

A leading % means it is a built-in magic command in iPython 领先的%表示它是iPython的内置magic command

In this case, %matplotlib inline enables the inline backend for usage with the IPython Notebook 在这种情况下, %matplotlib inline启用内联后端以用于IPython Notebook

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM