Skip to content

Commit

Permalink
Hotfix/0.6.1 (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpnota committed Sep 30, 2020
1 parent 31e5aa9 commit 8085344
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions all/environments/gym.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ def name(self):
return self._name

def reset(self):
self._state = State.from_gym(self._env.reset(), device=self._device)
self._state = State.from_gym(self._env.reset(), dtype=self._env.observation_space.dtype, device=self._device)
return self._state

def step(self, action):
self._state = State.from_gym(self._env.step(self._convert(action)), device=self._device)
self._state = State.from_gym(
self._env.step(self._convert(action)),
dtype=self._env.observation_space.dtype,
device=self._device
)
return self._state

def render(self, **kwargs):
Expand Down

0 comments on commit 8085344

Please sign in to comment.