I'm trying to display the red channel of an image using Matplotlib.pyplot and NumPy only. Can someone explain, why I get different images for the following two codes?

Code #1:

```
R = numpy.copy(img)           # copy image into new array
R[:,:,1]=0                    # set green channel to 0
R[:,:,2]=0                    # set blue channel to 0
matplotlib.pyplot.imshow(R)
matplotlib.plyplot.show()     # display new image

```

Code #2:

```
R = numpy.zeros(img.shape)    # create array of 0-s with same dimensions as image
R[:,:,0]=img[:,:,0]           # copy red channel values into array of 0-s
matplotlib.pyplot.imshow(R)
matplotlib.plyplot.show()     # display new image

```