mcExchange
mcExchange

Reputation: 6496

% sign before library in Ipython

Does anyone know what the % sign in front of a library means in Ipython?
In a caffe tutorial there are the following first lines of a python script:

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

What does the third row %matplotlib inline do here?

Upvotes: 3

Views: 172

Answers (1)

tmdavison
tmdavison

Reputation: 69116

A leading % means it is a built-in magic command in iPython

In this case, %matplotlib inline enables the inline backend for usage with the IPython Notebook

Upvotes: 4

Related Questions