MCPcopy Create free account
hub / github.com/WendyShang/flare / __init__

Method __init__

utils.py:278–290  ·  view source on GitHub ↗
(self, env, k)

Source from the content-addressed store, hash-verified

276
277class FrameStack(gym.Wrapper):
278 def __init__(self, env, k):
279 gym.Wrapper.__init__(self, env)
280 self._k = k
281 self._frames = deque([], maxlen=k)
282 self._qpos = deque([], maxlen=k)
283 shp = env.observation_space.shape
284 self.observation_space = gym.spaces.Box(
285 low=0,
286 high=1,
287 shape=((shp[0] * k,) + shp[1:]),
288 dtype=env.observation_space.dtype
289 )
290 self._max_episode_steps = env._max_episode_steps
291
292 def reset(self):
293 obs = self.env.reset()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected