class_docstr: Append a one-hot task representation to an environment.
  
  See TaskOnehotWrapper.wrap_env_list for the recommended way of creating
  this class.
  
  Args:
      env (Environment): The environment to wrap.
      task_index (int): The index of this task among the tasks.
      n_total_tasks (int): The number of total tasks.
class_docstr_tok: ["Append","a","one-hot","task","representation","to","an","environment",".","See","TaskOnehotWrapper.wrap_env_list","for","the","recommended","way","of","creating","this","class",".","Args",":","env","(","Environment",")",":","The","environment","to","wrap",".","task_index","(","int",")",":","The","index","of","this","task","among","the","tasks",".","n_total_tasks","(","int",")",":","The","number","of","total","tasks","."]
docstr: Concatenate observation and task one-hot.
  
  Args:
      obs (numpy.ndarray): observation
  
  Returns:
      numpy.ndarray: observation + task one-hot.
docstr_tok: ["Concatenate","observation","and","task","one-hot",".","Args",":","obs","(","numpy.ndarray",")",":","observation","Returns",":","numpy.ndarray",":","observation","+","task","one-hot","."]
code: def _obs_with_one_hot(self, obs):
      """Concatenate observation and task one-hot.
  
      Args:
          obs (numpy.ndarray): observation
  
      Returns:
          numpy.ndarray: observation + task one-hot.
  
      """
      one_hot = np.zeros(self._n_total_tasks)
      one_hot[self._task_index] = 1.0
      return np.concatenate([obs, one_hot])
  
file_path: garage/src/garage/envs/task_onehot_wrapper.py
imports: import akro
  import numpy
  from garage import EnvSpec, EnvStep, Wrapper
label_desc: Use image node_id 6 for calling the TaskOnehotWrapper obj's underlying member method code with example usage: obj._obs_with_one_hot(obs) and returns: np