Solved by ptrblck in post #2 
              
              
                PIL would check the image format, in particular the number of channels, and will return 3 channels for RGB images and will remove the channel dimension for grayscale images, which is the case for the image in the shape [200, 200]. 
You could use Image.open(path).convert('RGB') to transform the grays…