Add dtype to Box initialization, fixes #868 (#1092)

Otherwise it generates warnings:

#868
This commit is contained in:
Ge Yang
2018-09-17 10:27:31 -07:00
committed by pzhokhov
parent 4d7136c8b1
commit d99d5bcc17

View File

@@ -46,7 +46,7 @@ class MujocoEnv(gym.Env):
bounds = self.model.actuator_ctrlrange.copy()
low = bounds[:, 0]
high = bounds[:, 1]
self.action_space = spaces.Box(low=low, high=high)
self.action_space = spaces.Box(low=low, high=high, dtype=np.float32)
high = np.inf*np.ones(self.obs_dim)
low = -high