code: def pure2mixed(num_actions, action):
      
      mixed_action = np.zeros(num_actions)
      mixed_action[action] = 1
      return mixed_action
docs: Convert a pure action to the corresponding mixed action.
  
      Parameters
      ----------
      num_actions : scalar(int)
          The number of the pure actions (= the length of a mixed action).
  
      action : scalar(int)
          The pure action to convert to the corresponding mixed action.
  
      Returns
      -------
      ndarray(float, ndim=1)
          The mixed action representation of the given pure action.