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.
This exercise is part of the course
Introduction to NumPy
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Reduce every value in rgb_array by 50 percent
darker_rgb_array = ____