Hello Python community,
I am trying to load an image into a pylab array. All packages are installed as it should be but I keep receiving the following error when running my code:
img = pl.array(Image.open("Empire2.jpg"))
AttributeError: module 'pylab' has no attribute 'array'
My code is :
Thanks for the help and Happy New Year to ALL!
I am trying to load an image into a pylab array. All packages are installed as it should be but I keep receiving the following error when running my code:
img = pl.array(Image.open("Empire2.jpg"))
AttributeError: module 'pylab' has no attribute 'array'
My code is :
from PIL import Image import pylab as pl img = pl.array(Image.open("Empire2.jpg")) pl.imshow(img) x = [100,100,400,400] y = [200,300,200,400] plot(x,y,"r*") plot(x[:2],y[:2]) title("Plotting the Empire") show()I verified for any file named pylab.py in my working directory (from Internet search), but still no luck.
Thanks for the help and Happy New Year to ALL!