DATA170
Exploring Data

Activity 9

Fancy Indexing

  1. Write a Python program that uses numpy and imageio to create a gradient an image. The program should not read any image. Instead it should use numpy to create an array for the image and use imageio to write the image to a file.

    For example, a red to black gradient image:

    gradient