def flat_obs(self, obs: (np.ndarray, list)): """ :param obs: observation of the agent :type obs: (np.ndarray, list) :return: flatten observation parameter :rtype: np.ndarray """ return flatten(self.obs_space, obs)
def flat_action(self, action: (np.ndarray, list)): """ :param action: action taken by agent :type action: (np.ndarray, list) :return: flatten action parameter :rtype: np.ndarray """ return flatten(self.action_space, action)
def flat(space: Space, obs_or_action: (np.ndarray, list)): """ :param space: space of environment :type space: Space :param obs_or_action: action or observation space :type obs_or_action: (np.ndarray, list) :return: flatten action or observation space :rtype: Space """ return flatten(space, obs_or_action)
def flat_obs(self, obs: (np.ndarray, list)): return flatten(self.obs_space, obs)
def flat_action(self, action: (np.ndarray, list)): return flatten(self.action_space, action)
def flat(space: Space, obs_or_action: (np.ndarray, list)): return flatten(space, obs_or_action)