#NEWLINE# def test_var_interface( self ) : #NEWLINE# #INDENT# for ( shape , broadcast ) in zip ( self . shape_list , self . broadcast_list ) : #NEWLINE# #INDENT# data = numpy . random . random ( size = shape ) . astype ( theano . config . floatX ) #NEWLINE# variable = tensor . TensorType ( theano . config . floatX , broadcast ) ( ) #NEWLINE# f = theano . function ( [ variable ] , variable . squeeze ( ) ) #NEWLINE# expected = numpy . squeeze ( data ) #NEWLINE# tested = f ( data ) #NEWLINE# assert ( tested . shape == expected . shape ) #NEWLINE# assert numpy . allclose ( tested , expected )