class_docstr: Grayscale wrapper for gym.Env, converting frames to grayscale.
  
  Only works with gym.spaces.Box environment with 2D RGB frames.
  The last dimension (RGB) of environment observation space will be removed.
  
  Example:
      env = gym.make('Env')
      # env.observation_space = (100, 100, 3)
  
      env_wrapped = Grayscale(gym.make('Env'))
      # env.observation_space = (100, 100)
  
  Args:
      env (gym.Env): Environment to wrap.
  
  Raises:
      ValueError: If observation space shape is not 3
          or environment is not gym.spaces.Box.
class_docstr_tok: ["Grayscale","wrapper","for","gym.Env",",","converting","frames","to","grayscale",".","Only","works","with","gym.spaces.Box","environment","with","2D","RGB","frames",".","The","last","dimension","(","RGB",")","of","environment","observation","space","will","be","removed",".","Example",":","env","=","gym.make","(","'Env","'",")","#","env.observation_space","=","(","100",",","100",",","3",")","env_wrapped","=","Grayscale","(","gym.make","(","'Env","'",")",")","#","env.observation_space","=","(","100",",","100",")","Args",":","env","(","gym.Env",")",":","Environment","to","wrap",".","Raises",":","ValueError",":","If","observation","space","shape","is","not","3","or","environment","is","not","gym.spaces.Box","."]
docstr: See gym.Env.
  
  Args:
      action (np.ndarray): Action conforming to action_space
  
  Returns:
      np.ndarray: Observation conforming to observation_space
      float: Reward for this step
      bool: Termination signal
      dict: Extra information from the environment.
docstr_tok: ["See","gym.Env",".","Args",":","action","(","np.ndarray",")",":","Action","conforming","to","action_space","Returns",":","np.ndarray",":","Observation","conforming","to","observation_space","float",":","Reward","for","this","step","bool",":","Termination","signal","dict",":","Extra","information","from","the","environment","."]
code: def step(self, action):
      """See gym.Env.
  
      Args:
          action (np.ndarray): Action conforming to action_space
  
      Returns:
          np.ndarray: Observation conforming to observation_space
          float: Reward for this step
          bool: Termination signal
          dict: Extra information from the environment.
  
      """
      obs, reward, done, info = self.env.step(action)
      return _color_to_grayscale(obs), reward, done, info
  
file_path: garage/src/garage/envs/wrappers/grayscale.py
imports: import warnings
  import gym
  import gym.spaces
  import numpy
  from skimage import color, img_as_ubyte
label_desc: Use image node_id 5 for calling the Grayscale obj's underlying member method code with example usage: obj.step(action) and returns: _color_to_grayscale,  reward,  done,  info