class_docstr: gym.Env wrapper to stack multiple frames.
  
  Useful for training feed-forward agents on dynamic games.
  Only works with gym.spaces.Box environment with 2D single channel frames.
  
  Args:
      env (gym.Env): gym.Env to wrap.
      n_frames (int): number of frames to stack.
      axis (int): Axis to stack frames on. This should be 2 for tensorflow
          and 0 for pytorch.
  
  Raises:
       ValueError: If observation space shape is not 2 dimnesional,
       if the environment is not gym.spaces.Box, or if the specified axis
       is not 0 or 2.
class_docstr_tok: ["gym.Env","wrapper","to","stack","multiple","frames",".","Useful","for","training","feed-forward","agents","on","dynamic","games",".","Only","works","with","gym.spaces.Box","environment","with","2D","single","channel","frames",".","Args",":","env","(","gym.Env",")",":","gym.Env","to","wrap",".","n_frames","(","int",")",":","number","of","frames","to","stack",".","axis","(","int",")",":","Axis","to","stack","frames","on",".","This","should","be","2","for","tensorflow","and","0","for","pytorch",".","Raises",":","ValueError",":","If","observation","space","shape","is","not","2","dimnesional",",","if","the","environment","is","not","gym.spaces.Box",",","or","if","the","specified","axis","is","not","0","or","2","."]
docstr: gym.spaces.Box: gym.Env observation space.
docstr_tok: ["gym.spaces.Box",":","gym.Env","observation","space","."]
code: def observation_space(self):
      """gym.spaces.Box: gym.Env observation space."""
      return self._observation_space
  
file_path: garage/src/garage/envs/wrappers/stack_frames.py
imports: from collections import deque
  import gym
  import gym.spaces
  import numpy
label_desc: Use image node_id 2 for calling the StackFrames obj's underlying member method code with example usage: obj.observation_space() and returns: self