#NEWLINE# def make_node( self , _input ) : #NEWLINE# #INDENT# input = as_tensor_variable ( _input ) #NEWLINE# ib = tuple ( input . type . broadcastable ) #NEWLINE# if ( not ( ib == self . input_broadcastable ) ) : #NEWLINE# #INDENT# if ( len ( ib ) != len ( self . input_broadcastable ) ) : #NEWLINE# #INDENT# raise TypeError ( ( 'The number of dimensions of the input is incorrect for this op. Expected %s, got %s.' % ( self . input_broadcastable , ib ) ) ) #NEWLINE# #UNINDENT# for ( expected , b ) in zip ( self . input_broadcastable , ib ) : #NEWLINE# #INDENT# if ( ( expected is True ) and ( b is False ) ) : #NEWLINE# #INDENT# raise TypeError ( ( 'The broadcastable pattern of the input is incorrect for this op. Expected %s, got %s.' % ( self . input_broadcastable , ib ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# ob = [ ] #NEWLINE# for value in self . new_order : #NEWLINE# #INDENT# if ( value == 'x' ) : #NEWLINE# #INDENT# ob . append ( True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ob . append ( ib [ input ] ) #NEWLINE# #UNINDENT# #UNINDENT# output = TensorType ( dtype = input . type . dtype , broadcastable = ob ) ( ) #NEWLINE# return Apply ( self , [ input ] , [ output ] )