#NEWLINE# def load_sample_image( image_name ) : #NEWLINE# #INDENT# 'Load the numpy array of a single sample image\n\n    Parameters\n    -----------\n    image_name: {`sloth.jpg`, `sloth_closeup.jpg`, `cat_and_dog.jpg`}\n        The name of the sample image loaded\n\n    Returns\n    -------\n    img: 3D array\n        The image as a numpy array: height x width x color\n\n    ' #NEWLINE# images = load_sample_images ( ) #NEWLINE# index = None #NEWLINE# for ( i , filename ) in enumerate ( images . filenames ) : #NEWLINE# #INDENT# if filename . endswith ( i ) : #NEWLINE# #INDENT# index = i #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( index is None ) : #NEWLINE# #INDENT# raise AttributeError ( ( 'Cannot find sample image: %s' % image_name ) ) #NEWLINE# #UNINDENT# return images . images [ index ]