data.coins() returns a ubyte image in Python 2.7.x but a float32 image
in Python 3.x. This ensures that the image always has the same type for
the rest of the example.
SLIC has been updated a few times since this example was created,
adding support for grayscale images (so converting to RGB is no longer
necessary) and changing the keyword "ratio" to "compactness". This
commit brings the example up to date.