<s> """<STR_LIT>""" <EOL> from pylearn2 . datasets . mnistplus import MNISTPlus <EOL> from pylearn2 . space import IndexSpace , VectorSpace <EOL> import unittest <EOL> from pylearn2 . testing . skip import skip_if_no_data <EOL> import numpy as np <EOL> def test_MNISTPlus ( ) : <EOL> """<STR_LIT>""" <EOL> skip_if_no_data ( ) <EOL> for subset in [ '<STR_LIT:train>' , '<STR_LIT>' , '<STR_LIT:test>' ] : <EOL> ids = MNISTPlus ( which_set = subset ) <EOL> assert <NUM_LIT> >= ids . X . min ( ) >= <NUM_LIT:0.0> <EOL> assert <NUM_LIT> <= ids . X . max ( ) <= <NUM_LIT:1.0> <EOL> topo = ids . get_batch_topo ( <NUM_LIT:1> ) <EOL> assert topo . ndim == <NUM_LIT:4> <EOL> del ids <EOL> train_y = MNISTPlus ( which_set = '<STR_LIT:train>' , label_type = '<STR_LIT:label>' ) <EOL> assert <NUM_LIT> <= train_y . X . max ( ) <= <NUM_LIT:1.0> <EOL> assert <NUM_LIT:0.0> <= train_y . X . min ( ) <= <NUM_LIT> <EOL> assert train_y . y . max ( ) == <NUM_LIT:9> <EOL> assert train_y . y . min ( ) == <NUM_LIT:0> <EOL> assert train_y . y . shape == ( train_y . X . shape [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> train_y = MNISTPlus ( which_set = '<STR_LIT:train>' , label_type = '<STR_LIT>' ) <EOL> assert <NUM_LIT> <= train_y . X . max ( ) <= <NUM_LIT:1.0> <EOL> assert <NUM_LIT:0.0> <= train_y . X . min ( ) <= <NUM_LIT> <EOL> assert <NUM_LIT:0.0> <= train_y . y . max ( ) <= <NUM_LIT:1.0> <EOL> assert <NUM_LIT:0.0> <= train_y . y . min ( ) <= <NUM_LIT:1.0> <EOL> assert train_y . y . shape == ( train_y . X . shape [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> train_y = MNISTPlus ( which_set = '<STR_LIT:train>' , label_type = '<STR_LIT>' ) <EOL> assert <NUM_LIT> <= train_y . X . max ( ) <= <NUM_LIT:1.0> <EOL> assert <NUM_LIT:0.0> <= train_y . X . min ( ) <= <NUM_LIT> <EOL> assert train_y . y . max ( ) == <NUM_LIT:9> <EOL> assert train_y . y . min ( ) == <NUM_LIT:0> <EOL> assert train_y . y . shape == ( train_y . X . shape [ <NUM_LIT:0> ] , <NUM_LIT:1> ) <EOL> train_y = MNISTPlus ( which_set = '<STR_LIT:train>' , label_type = '<STR_LIT>' ) <EOL> assert <NUM_LIT> <= train_y . X . max ( ) <= <NUM_LIT:1.0> <EOL> assert <NUM_LIT:0.0> <= train_y . X . min ( ) <= <NUM_LIT> <EOL> assert train_y . y . max ( ) == <NUM_LIT:9> <EOL> assert train_y . y . min ( ) == <NUM_LIT:0> <EOL> assert train_y . y . shape == ( train_y . X . shape [ <NUM_LIT:0> ] , <NUM_LIT:1> ) </s>
