#NEWLINE# def __iter__( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# for i in xrange ( theano . tensor . basic . get_vector_length ( self ) ) : #NEWLINE# #INDENT# ( yield i [ i ] ) #NEWLINE# #UNINDENT# #UNINDENT# except TypeError : #NEWLINE# #INDENT# raise TypeError ( 'TensorType does not support iteration. Maybe you are using builtin.sum instead of theano.tensor.sum? (Maybe .max?)' )