chore: release v0.1.0
(cherry picked from commit 82525f882f3924a332d9ce40bf64255d0d14f6a4)
This commit is contained in:
@@ -37,9 +37,13 @@ class NpEnvRunner:
|
||||
action_space = self._env.action_space
|
||||
if isinstance(action_space, gym.spaces.Box):
|
||||
size = (self._env.num_envs, *action_space.shape)
|
||||
low = action_space.low
|
||||
high = action_space.high
|
||||
low = np.where(np.isneginf(low), -1e6, low)
|
||||
high = np.where(np.isposinf(high), 1e6, high)
|
||||
return np.random.uniform(
|
||||
low=action_space.low,
|
||||
high=action_space.high,
|
||||
low=low,
|
||||
high=high,
|
||||
size=size,
|
||||
).astype(action_space.dtype)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user