class_docstr: Replay Memory for saving data.
  Args:
      max_size (int): size of replay memory
      obs_dim (int): dimension of the observation
class_docstr_tok: ["Replay","Memory","for","saving","data",".","Args",":","max_size","(","int",")",":","size","of","replay","memory","obs_dim","(","int",")",":","dimension","of","the","observation"]
code: def append(self, obs, act, value, returns, log_prob, adv):
      size = len(obs)
  
      self._curr_size = min(self._curr_size + size, self.max_size)
  
      if self._curr_pos + size >= self.max_size:
          delta_size = -(size + self._curr_pos - self.max_size)
  
          self.obs = np.roll(self.obs, delta_size, 0)
          self.action = np.roll(self.action, delta_size)
          self.value = np.roll(self.value, delta_size)
          self.returns = np.roll(self.returns, delta_size)
          self.log_prob = np.roll(self.log_prob, delta_size)
          self.adv = np.roll(self.adv, delta_size)
  
          self._curr_pos += delta_size
  
      self.obs[self._curr_pos : self._curr_pos + size] = obs
      self.action[self._curr_pos : self._curr_pos + size] = act
      self.value[self._curr_pos : self._curr_pos + size] = value
      self.returns[self._curr_pos : self._curr_pos + size] = returns
      self.log_prob[self._curr_pos : self._curr_pos + size] = log_prob
      self.adv[self._curr_pos : self._curr_pos + size] = adv
  
      self._curr_pos = (self._curr_pos + size) % self.max_size
  
file_path: PARL/examples/Baselines/Halite_competition/paddle/rl_trainer/replay_memory.py
imports: import numpy
label_desc: Use image node_id 5 for calling the ReplayMemory obj's underlying member method code with example usage: obj.append(obs, act, value, returns, log_prob, adv) without return types