title: what does [:, :, ::-1] mean in python?
body: <p>I am running a program and I have the code below. But I do not know what does that <code>[:, :, ::-1]</code> do exactly. I get the following error when I run the program so understanding the function of <code>[:, :, ::-1]</code> will help me to debug. Thanks.</p>
  <pre><code>while True:
      ix = np.random.choice(np.arange(len(lists)), batch_size)
      imgs = []
      labels = []
      for i in ix:
          # images
          img_path = img_dir + lists.iloc[i, 0] + '.png'
          original_img = cv2.imread(img_path)[:, :, ::-1]
          resized_img = cv2.resize(original_img, dims+[3])
          array_img = img_to_array(resized_img)/255
          imgs.append(array_img)
  </code></pre>
  <p>error:</p>
  <pre><code>original_img = cv2.imread(img_path)[:, :, ::-1]
  TypeError: 'NoneType' object is not subscriptable
  </code></pre>