How to convert between NumPy array and PIL Image

Updated post here: https://codeyarns.github.io/tech/2014-01-16-how-to-convert-between-numpy-array-and-pil-image.html