class_docstr: Performs human rendering for an environment that only supports "rgb_array"rendering.
  
  This wrapper is particularly useful when you have implemented an environment that can produce
  RGB images but haven't implemented any code to render the images to the screen.
  If you want to use this wrapper with your environments, remember to specify ``"render_fps"``
  in the metadata of your environment.
  
  The ``render_mode`` of the wrapped environment must be either ``'rgb_array'`` or ``'rgb_array_list'``.
  
  Example:
      >>> env = gym.make("LunarLander-v2", render_mode="rgb_array")
      >>> wrapped = HumanRendering(env)
      >>> wrapped.reset()     # This will start rendering to the screen
  
  The wrapper can also be applied directly when the environment is instantiated, simply by passing
  ``render_mode="human"`` to ``make``. The wrapper will only be applied if the environment does not
  implement human-rendering natively (i.e. ``render_mode`` does not contain ``"human"``).
  
  Example:
      >>> env = gym.make("NoNativeRendering-v2", render_mode="human")      # NoNativeRendering-v0 doesn't implement human-rendering natively
      >>> env.reset()     # This will start rendering to the screen
  
  Warning: If the base environment uses ``render_mode="rgb_array_list"``, its (i.e. the *base environment's*) render method
      will always return an empty list:
  
          >>> env = gym.make("LunarLander-v2", render_mode="rgb_array_list")
          >>> wrapped = HumanRendering(env)
          >>> wrapped.reset()
          >>> env.render()
          []          # env.render() will always return an empty list!
class_docstr_tok: ["Performs","human","rendering","for","an","environment","that","only","supports","``","rgb_array","''","rendering",".","This","wrapper","is","particularly","useful","when","you","have","implemented","an","environment","that","can","produce","RGB","images","but","have","n't","implemented","any","code","to","render","the","images","to","the","screen",".","If","you","want","to","use","this","wrapper","with","your","environments",",","remember","to","specify","``","``","render_fps","''","``","in","the","metadata","of","your","environment",".","The","``","render_mode","``","of","the","wrapped","environment","must","be","either","``","'rgb_array","'","``","or","``","'rgb_array_list","'","``",".","Example",":",">",">",">","env","=","gym.make","(","``","LunarLander-v2","''",",","render_mode=","''","rgb_array","''",")",">",">",">","wrapped","=","HumanRendering","(","env",")",">",">",">","wrapped.reset","(",")","#","This","will","start","rendering","to","the","screen","The","wrapper","can","also","be","applied","directly","when","the","environment","is","instantiated",",","simply","by","passing","``","render_mode=","''","human","''","``","to","``","make","``",".","The","wrapper","will","only","be","applied","if","the","environment","does","not","implement","human-rendering","natively","(","i.e",".","``","render_mode","``","does","not","contain","``","``","human","''","``",")",".","Example",":",">",">",">","env","=","gym.make","(","``","NoNativeRendering-v2","''",",","render_mode=","''","human","''",")","#","NoNativeRendering-v0","does","n't","implement","human-rendering","natively",">",">",">","env.reset","(",")","#","This","will","start","rendering","to","the","screen","Warning",":","If","the","base","environment","uses","``","render_mode=","''","rgb_array_list","''","``",",","its","(","i.e",".","the","*","base","environment","'s","*",")","render","method","will","always","return","an","empty","list",":",">",">",">","env","=","gym.make","(","``","LunarLander-v2","''",",","render_mode=","''","rgb_array_list","''",")",">",">",">","wrapped","=","HumanRendering","(","env",")",">",">",">","wrapped.reset","(",")",">",">",">","env.render","(",")","[","]","#","env.render","(",")","will","always","return","an","empty","list","!"]
docstr: Reset the base environment and render a frame to the screen.
docstr_tok: ["Reset","the","base","environment","and","render","a","frame","to","the","screen","."]
code: def reset(self, *args, **kwargs):
      """Reset the base environment and render a frame to the screen."""
      result = self.env.reset(*args, **kwargs)
      self._render_frame()
      return result
  
file_path: gym/gym/wrappers/human_rendering.py
imports: import numpy
  import gym
  from gym.error import DependencyNotInstalled
label_desc: Use image node_id 4 for calling the HumanRendering obj's underlying member method code with example usage: obj.reset() and returns: result