#NEWLINE# def stateID2state( self , s_id ) : #NEWLINE# #INDENT# '\n        Returns the state vector correponding to a state_id.\n        If dimensions are continuous it returns the state representing the\n        middle of the bin (each dimension is discretized according to\n        ``representation.discretization``.\n\n        :param s_id: The id of the state, often calculated using the\n            ``state2bin`` function\n\n        :return: The state *s* corresponding to the integer *s_id*.\n        ' #NEWLINE# s = np . array ( id2vec ( s_id , self . bins_per_dim ) ) #NEWLINE# for d in xrange ( self . domain . state_space_dims ) : #NEWLINE# #INDENT# s [ d ] = bin2state ( s [ d ] , self . bins_per_dim [ d ] , self . domain . statespace_limits [ d , : ] ) #NEWLINE# #UNINDENT# if ( len ( self . domain . continuous_dims ) == 0 ) : #NEWLINE# #INDENT# s = s . astype ( int ) #NEWLINE# #UNINDENT# return s