<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pure2mixed(num_actions, action):
 """ 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. """

    mixed_action = np.zeros(num_actions)
    mixed_action[action] = 1
    return mixed_action