Skip to content

Commit

Permalink
Check Action Type
Browse files Browse the repository at this point in the history
  • Loading branch information
MentalGear authored Feb 27, 2020
1 parent e601c36 commit d3c17c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stable_baselines/common/vec_env/base_vec_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def step(self, actions):
:param actions: ([int] or [float]) the action
:return: ([int] or [float], [float], [bool], dict) observation, reward, done, information
"""
assert isinstance( actions, ( list, np.ndarray ) ), "Action must be of type list or np.ndarray. Try wrapping your action variable in a list [ ] to fix this issue."
self.step_async(actions)
return self.step_wait()

Expand Down

0 comments on commit d3c17c5

Please sign in to comment.