Skip to content

Commit 5ec1ba4

Browse files
committed
Uses akro.Box
1 parent a2b7afb commit 5ec1ba4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/garage/envs/rl2_env.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, env, max_obs_dim=None):
2828
super().__init__(env)
2929
self._max_obs_dim = max_obs_dim
3030
action_space = akro.from_gym(self.env.action_space)
31-
observation_space = akro.from_gym(self._create_rl2_obs_space(env))
31+
observation_space = self._create_rl2_obs_space(env)
3232
self._spec = EnvSpec(action_space=action_space,
3333
observation_space=observation_space)
3434

@@ -46,9 +46,9 @@ def _create_rl2_obs_space(self, env):
4646
action_flat_dim = np.prod(env.action_space.shape)
4747
if self._max_obs_dim is not None:
4848
obs_flat_dim = self._max_obs_dim
49-
return gym.spaces.Box(low=-np.inf,
50-
high=np.inf,
51-
shape=(obs_flat_dim + action_flat_dim + 1 + 1, ))
49+
return akro.Box(low=-np.inf,
50+
high=np.inf,
51+
shape=(obs_flat_dim + action_flat_dim + 1 + 1, ))
5252

5353
# pylint: disable=arguments-differ
5454
def reset(self):

0 commit comments

Comments
 (0)