class_docstr: Observation wrapper that stacks the observations in a rolling manner.
  
  For example, if the number of stacks is 4, then the returned observation contains
  the most recent 4 observations. For environment 'Pendulum-v1', the original observation
  is an array with shape [3], so if we stack 4 observations, the processed observation
  has shape [4, 3].
  
  Note:
      - To be memory efficient, the stacked observations are wrapped by :class:`LazyFrame`.
      - The observation space must be :class:`Box` type. If one uses :class:`Dict`
        as observation space, it should apply :class:`FlattenObservation` wrapper first.
        - After :meth:`reset` is called, the frame buffer will be filled with the initial observation. I.e. the observation returned by :meth:`reset` will consist of ``num_stack`-many identical frames,
  
  Example:
      >>> import gym
      >>> env = gym.make('CarRacing-v1')
      >>> env = FrameStack(env, 4)
      >>> env.observation_space
      Box(4, 96, 96, 3)
      >>> obs = env.reset()
      >>> obs.shape
      (4, 96, 96, 3)
class_docstr_tok: ["Observation","wrapper","that","stacks","the","observations","in","a","rolling","manner",".","For","example",",","if","the","number","of","stacks","is","4",",","then","the","returned","observation","contains","the","most","recent","4","observations",".","For","environment","'Pendulum-v1","'",",","the","original","observation","is","an","array","with","shape","[","3","]",",","so","if","we","stack","4","observations",",","the","processed","observation","has","shape","[","4",",","3","]",".","Note",":","-","To","be","memory","efficient",",","the","stacked","observations","are","wrapped","by",":","class",":","`","LazyFrame","`",".","-","The","observation","space","must","be",":","class",":","`","Box","`","type",".","If","one","uses",":","class",":","`","Dict","`","as","observation","space",",","it","should","apply",":","class",":","`","FlattenObservation","`","wrapper","first",".","-","After",":","meth",":","`","reset","`","is","called",",","the","frame","buffer","will","be","filled","with","the","initial","observation",".","I.e",".","the","observation","returned","by",":","meth",":","`","reset","`","will","consist","of","``","num_stack","`","-many","identical","frames",",","Example",":",">",">",">","import","gym",">",">",">","env","=","gym.make","(","'CarRacing-v1","'",")",">",">",">","env","=","FrameStack","(","env",",","4",")",">",">",">","env.observation_space","Box","(","4",",","96",",","96",",","3",")",">",">",">","obs","=","env.reset","(",")",">",">",">","obs.shape","(","4",",","96",",","96",",","3",")"]
docstr: Reset the environment with kwargs.
  
  Args:
      **kwargs: The kwargs for the environment reset
  
  Returns:
      The stacked observations
docstr_tok: ["Reset","the","environment","with","kwargs",".","Args",":","*","*","kwargs",":","The","kwargs","for","the","environment","reset","Returns",":","The","stacked","observations"]
code: def reset(self, **kwargs):
      """Reset the environment with kwargs.
  
      Args:
          **kwargs: The kwargs for the environment reset
  
      Returns:
          The stacked observations
      """
      obs, info = self.env.reset(**kwargs)
  
      [self.frames.append(obs) for _ in range(self.num_stack)]
  
      return self.observation(None), info
  
file_path: gym/gym/wrappers/frame_stack.py
imports: from collections import deque
  from typing import Union
  import numpy
  import gym
  from gym.error import DependencyNotInstalled
  from gym.spaces import Box
label_desc: Use image node_id 4 for calling the FrameStack obj's underlying member method code with example usage: obj.reset() and returns: self,  info