def test_show_examples():
 skip_if_no_matplotlib()
 skip_if_no_data()
 with open('temp.yaml', 'w') as f:
  f.write("\n!obj:pylearn2.datasets.mnist.MNIST {\n        which_set: 'train'\n}\n")
 show_examples('temp.yaml', 28, 28, out='garbage.png')
 os.remove('temp.yaml')

def test_show_examples ( ) : skip_if_no_matplotlib ( ) skip_if_no_data ( ) with open ( 'temp.yaml' , 'w' ) as f : f . write ( "\n!obj:pylearn2.datasets.mnist.MNIST {\n        which_set: 'train'\n}\n" ) show_examples ( 'temp.yaml' , 28 , 28 , out = 'garbage.png' ) os . remove ( 'temp.yaml' )
create a yaml file of the mnist dataset and show examples .