pantheonrl.common.util.clip_actions
- clip_actions(actions, policy)[source]
Return the actions clipped by the action space of the policy
- Parameters:
actions (ndarray) – Raw action(could be outside of the action space)
policy (ActorCriticPolicy | BaseAlgorithm) – The policy to use to clip the actions
- Returns:
The actions clipped by the policy
- Return type:
ndarray