I came across an exercise in image processing about Generating a sequence of intensities (R channel) with the following code
R = np.reshape(im[:,:,0],im.shape