class_docstr: Affinely rescales the continuous action space of the environment to the range [min_action, max_action].
  
  The base environment :attr:`env` must have an action space of type :class:`spaces.Box`. If :attr:`min_action`
  or :attr:`max_action` are numpy arrays, the shape must match the shape of the environment's action space.
  
  Example:
      >>> import gym
      >>> env = gym.make('BipedalWalker-v3')
      >>> env.action_space
      Box(-1.0, 1.0, (4,), float32)
      >>> min_action = -0.5
      >>> max_action = np.array([0.0, 0.5, 1.0, 0.75])
      >>> env = RescaleAction(env, min_action=min_action, max_action=max_action)
      >>> env.action_space
      Box(-0.5, [0.   0.5  1.   0.75], (4,), float32)
      >>> RescaleAction(env, min_action, max_action).action_space == gym.spaces.Box(min_action, max_action)
      True
docstr: Initializes the :class:`RescaleAction` wrapper.
  
  Args:
      env (Env): The environment to apply the wrapper
      min_action (float, int or np.ndarray): The min values for each action. This may be a numpy array or a scalar.
      max_action (float, int or np.ndarray): The max values for each action. This may be a numpy array or a scalar.
docstr_tok: ["Initializes","the",":","class",":","`","RescaleAction","`","wrapper",".","Args",":","env","(","Env",")",":","The","environment","to","apply","the","wrapper","min_action","(","float",",","int","or","np.ndarray",")",":","The","min","values","for","each","action",".","This","may","be","a","numpy","array","or","a","scalar",".","max_action","(","float",",","int","or","np.ndarray",")",":","The","max","values","for","each","action",".","This","may","be","a","numpy","array","or","a","scalar","."]
code: def __init__(
      self,
      env: gym.Env,
      min_action: Union[float, int, np.ndarray],
      max_action: Union[float, int, np.ndarray],
  ):
      """Initializes the :class:`RescaleAction` wrapper.
  
      Args:
          env (Env): The environment to apply the wrapper
          min_action (float, int or np.ndarray): The min values for each action. This may be a numpy array or a scalar.
          max_action (float, int or np.ndarray): The max values for each action. This may be a numpy array or a scalar.
      """
      assert isinstance(
          env.action_space, spaces.Box
      ), f"expected Box action space, got {type(env.action_space)}"
      assert np.less_equal(min_action, max_action).all(), (
          min_action,
          max_action,
      )
  
      super().__init__(env)
      self.min_action = (
          np.zeros(env.action_space.shape, dtype=env.action_space.dtype)
          + min_action
      )
      self.max_action = (
          np.zeros(env.action_space.shape, dtype=env.action_space.dtype)
          + max_action
      )
      self.action_space = spaces.Box(
          low=min_action,
          high=max_action,
          shape=env.action_space.shape,
          dtype=env.action_space.dtype,
      )
  
imports: from typing import Union
  import numpy
  import gym
  from gym import spaces
label_desc: Use image node_id 1 to create a new RescaleAction object from inherited base classes: gym with example: obj = RescaleAction(env, min_action, max_action)