#NEWLINE# def perform( self , node , inputs , out_ ) : #NEWLINE# #INDENT# ( out , ) = out_ #NEWLINE# if ( not self . inplace ) : #NEWLINE# #INDENT# out [ 0 ] = inputs [ 0 ] . copy ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# out [ 0 ] = inputs [ 0 ] #NEWLINE# #UNINDENT# if self . set_instead_of_inc : #NEWLINE# #INDENT# out [ 0 ] [ inputs [ 2 : ] ] = inputs [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( inplace_increment is not None ) : #NEWLINE# #INDENT# inplace_increment ( out [ 0 ] , tuple ( out_ [ 2 : ] ) , inputs [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . allow_legacy_perform : #NEWLINE# #INDENT# out [ 0 ] [ inputs [ 2 : ] ] += inputs [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise NotImplementedError ( 'Could not import inplace_increment, so some advanced indexing features are disabled. They will be available if you update NumPy to version 1.8 or later, or to the latest development version. You may need to clear the cache (theano-cache clear) afterwards.' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( ( numpy . __version__ <= '1.6.1' ) and ( out [ 0 ] . size != numpy . uint32 ( out [ 0 ] . size ) ) ) : #NEWLINE# #INDENT# warnings . warn ( ( 'Numpy versions 1.6.1 and below have a bug preventing advanced indexing from correctly filling arrays that are too big (>= 2^32 elements). It is possible that out[0] (%s), with shape %s, is not correctly filled.' % ( out [ 0 ] , out [ 0 ] . shape ) ) )