#NEWLINE# def test_no_make_node( self ) : #NEWLINE# #INDENT# class DoubleOp ( Op ) : #NEWLINE# #INDENT# 'An Op without make_node' #NEWLINE# __props__ = ( ) #NEWLINE# itypes = [ T . dmatrix ] #NEWLINE# otypes = [ T . dmatrix ] #NEWLINE# def perform( self , node , inputs , outputs ) : #NEWLINE# #INDENT# inp = inputs [ 0 ] #NEWLINE# output = outputs [ 0 ] #NEWLINE# output [ 0 ] = ( inp * 2 ) #NEWLINE# #UNINDENT# #UNINDENT# x_input = T . dmatrix ( 'x_input' ) #NEWLINE# f = theano . function ( [ x_input ] , DoubleOp ( ) ( inp ) ) #NEWLINE# inp = numpy . random . rand ( 5 , 4 ) #NEWLINE# out = f ( inp ) #NEWLINE# assert numpy . allclose ( ( inp * 2 ) , out )