1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to NumPy

Exercise

Update and save

Perhaps you are training a machine learning model to recognize ocean scenes. You'd like the model to understand that oceans are not only associated with bright, summery colors, so you're careful to include images of oceans in bad weather or evening light as well. You may have to manually transform some images in order to balance the data, so your task is to darken the Monet ocean scene rgb_array.

Recall from the video that white is associated with the maximum RGB value of 255, while darker colors are associated with lower values. numpy is loaded as np, and the 3D Monet rgb_array that you loaded in the last exercise is available.

Instructions 1/3

undefined XP
    1
    2
    3
  • Reduce every value in rgb_array by 50 percent, saving the resulting array as darker_rgb_array.