Issue
I'm following this tutorial and I've tried to copy the code of the first example. this is the first lines on the example:
from PIL import Image
import random
import time
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import imshow, show
import matplotlib.animation as animation
#this is crucial to animation in matplotlib
%matplotlib notebook
.
.
.
As you can see, right underneath the imports, there is this line %matplotlib notebook
. this line is causing a problems because it doesn't recognized as a command.
this is the problem description: Statement expected, found Py:PERC
and End of statement expected
My question is - what is the meaning of the percentage symbol in this case and why doesn't it work?
Solution
This syntax is a Jupyter notebook convention. if you are not using Jupyter notebook you can probebly remove this line.
Answered By - Rivka strilitz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.