#NEWLINE# def __getitem__( self , * args ) : #NEWLINE# #INDENT# value = self . get_value ( borrow = True ) #NEWLINE# if isinstance ( value , numpy . ndarray ) : #NEWLINE# #INDENT# msg = ( "a Numpy array with dtype: '%s'. This data type is not currently recognized by Theano tensors: please cast your data into a supported numeric type if you need Theano tensor functionalities." % value . dtype ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = ( 'an object of type: %s. Did you forget to cast it into a Numpy array before calling theano.shared()?' % type ( value ) ) #NEWLINE# #UNINDENT# raise TypeError ( ( "The generic 'SharedVariable' object is not subscriptable. This shared variable contains %s" % msg ) )