title: Trying to run simple PIL python example, can't convert jpeg to float
body: <p>so I wrote a simple python script</p>
  
  <pre><code>from PIL import Image
  from pylab import *
  im = array(Image.open('sample.jpg'))
  imshow(im)
  </code></pre>
  
  <p>and i get this error from IDLE</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/michael/Dropbox/OpenCV/greyscale.py", line 5, in &lt;module&gt;
      imshow(im)
    File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 2722, in     imshow
     imlim=imlim, resample=resample, url=url, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes.py", line 7091, in imshow
  im.set_data(X)
    File "/usr/local/lib/python2.7/dist-packages/matplotlib/image.py", line 418, in     set_data
      raise TypeError("Image data can not convert to float")
  TypeError: Image data can not convert to float
  </code></pre>
  
  <p>basically says i can not covert my image to float, anyone know what im missing</p>