docstr: o(t), u(t-1)_a, agent_id
          
docstr_tok: ["o","(","t",")",",","u","(","t-1",")","_a",",","agent_id"]
code: def _get_actor_inputs(self, batch):
      """o(t), u(t-1)_a, agent_id"""
      obs = batch["o"]
      u_onehot = batch["u_onehot"]
      u_onehot_last = np.zeros_like(u_onehot)
      u_onehot_last[:, 1:] = u_onehot[:, :-1]
      ep_num = batch["o"].shape[0]
      tr_num = batch["o"].shape[1]
  
      actor_inputs = []
      for agent_id in range(self.n_agents):
          obs_a = obs[:, :, agent_id]
          u_a_onehot_last = u_onehot_last[:, :, agent_id]
          id_onehot = np.zeros((ep_num, tr_num, self.n_agents))
          id_onehot[:, :, agent_id] = 1.0
          # actor inputs: obs + agent's last action(one_hot) + agent's id(one_hot)
          a_inputs = np.concatenate(
              (obs_a, u_a_onehot_last, id_onehot), axis=2
          )
          # a_inpits shape (ep_num, tr_num, actor_input_dim)
          actor_inputs.append(a_inputs)
  
      actor_inputs = np.stack(
          actor_inputs, axis=2
      )  # shape (ep_num, tr_num, n_agents, actor_input_dim)
      return actor_inputs
  
file_path: PARL/benchmark/torch/coma/sc2_agent.py
imports: import numpy
  import parl
  import torch
  from torch.distributions import Categorical
label_desc: Use image node_id 5 for calling the Agents obj's underlying member method code with example usage: obj._get_actor_inputs(batch) and returns: actor_inputs