class_docstr: gym.Env wrapper for resizing frame to (width, height).
  
  Only works with gym.spaces.Box environment with 2D single channel frames.
  
  Example:
      | env = gym.make('Env')
      | # env.observation_space = (100, 100)
      | env_wrapped = Resize(gym.make('Env'), width=64, height=64)
      | # env.observation_space = (64, 64)
  
  Args:
      env: gym.Env to wrap.
      width: resized frame width.
      height: resized frame height.
  
  Raises:
      ValueError: If observation space shape is not 2
          or environment is not gym.spaces.Box.
code: def _observation(self, obs):
      with warnings.catch_warnings():
          """
          Suppressing warnings for
          1. possible precision loss when converting from float64 to uint8
          2. anti-aliasing will be enabled by default in skimage 0.15
          """
          warnings.simplefilter("ignore")
          obs = resize(
              obs, (self._width, self._height)
          )  # now it's float
          if self._dtype == np.uint8:
              obs = img_as_ubyte(obs)
      return obs
  
file_path: garage/src/garage/envs/wrappers/resize.py
imports: import warnings
  import gym
  import gym.spaces
  import numpy
  from skimage import img_as_ubyte
  from skimage.transform import resize
label_desc: Use image node_id 4 for calling the Resize obj's underlying member method code with example usage: obj._observation(obs) and returns: obs