(self, t=None)
return X
Get the state. Put it together if not precomputed.
Get the state. Put it together if not precomputed.
Get the state . Put it together if not precomputed .
def get_X(self, t=None):
        """ Get the state. Put it together if not precomputed. """
        X = self._X if t is None else self._X[t, :]
        if np.any(np.isnan(X)):
            for data_type in self._data:
                if data_type not in self.agent.x_data_types:
                    continue
                data = (self._data[data_type] if t is None
                        else self._data[data_type][t, :])
                self.agent.pack_data_x(X, data, data_types=[data_type])
        return X
def get_X ( self , t = None ) : X = self . _X if t is None else self . _X [ t , : ] if np . any ( np . isnan ( X ) ) : for data_type in self . _data : if data_type not in self . agent . x_data_types : continue data = ( self . _data [ data_type ] if t is None else self . _data [ data_type ] [ t , : ] ) self . agent . pack_data_x ( X , data , data_types = [ data_type ] ) return X