ignore singleton dimensions in ndarrays passed to imshow

instigated by this: http://stackoverflow.com/questions/15008045/showing-an-image-with-pylab-imshow/15008830#15008830

This just gets rid of singleton dimensions in ndarrays that are passed in.