From d99d5bcc17352b44d5f09d08a63d2e93142762c8 Mon Sep 17 00:00:00 2001 From: Ge Yang Date: Mon, 17 Sep 2018 10:27:31 -0700 Subject: [PATCH] Add dtype to Box initialization, fixes #868 (#1092) Otherwise it generates warnings: #868 --- gym/envs/mujoco/mujoco_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gym/envs/mujoco/mujoco_env.py b/gym/envs/mujoco/mujoco_env.py index e4a954ec2..daf424cee 100644 --- a/gym/envs/mujoco/mujoco_env.py +++ b/gym/envs/mujoco/mujoco_env.py @@ -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