--- jupyter: nbformat: 4 nbformat_minor: 2 --- ::: {.cell .code execution_count="1"} ``` python import matplotlib.pyplot as plt from matplotlib.cbook import get_sample_data ``` ::: ::: {.cell .code execution_count="2"} ``` python with get_sample_data("grace_hopper.jpg") as file: image_array = plt.imread(file) ``` ::: ::: {.cell .code execution_count="3"} ``` python image_array ``` ::: {.output .execute_result execution_count="3"} array([[[ 21, 24, 77], [ 27, 30, 85], [ 33, 35, 92], ..., [ 76, 114, 189], [ 71, 109, 184], [ 76, 114, 189]], [[ 26, 29, 82], [ 25, 28, 83], [ 27, 29, 86], ..., [ 60, 98, 173], [ 56, 94, 169], [ 62, 100, 175]], [[ 21, 24, 77], [ 20, 23, 78], [ 20, 22, 79], ..., [ 79, 117, 190], [ 80, 118, 191], [ 88, 126, 199]], ..., [[153, 13, 24], [163, 18, 31], [164, 18, 29], ..., [ 14, 13, 19], [ 13, 12, 18], [ 11, 10, 16]], [[149, 12, 22], [156, 14, 26], [160, 16, 26], ..., [ 13, 12, 18], [ 13, 12, 18], [ 12, 11, 17]], [[150, 12, 25], [154, 14, 25], [157, 16, 25], ..., [ 14, 13, 19], [ 14, 13, 19], [ 14, 13, 19]]], dtype=uint8) ::: ::: ::: {.cell .code execution_count="4"} ``` python plt.imshow(image_array) plt.show() ``` ::: {.output .execute_result execution_count="4"} ![](fcbe61351f965c3664d65d5e93991915402e0483.png) ::: :::