class_docstr: The DiscretizeActionsWrapper provides functionality for discretizing individual continuous actions into discrete
   ones.
  
  An example is given by having a continuous action called 'action_up' with space:
  gym.spaces.Box(shape=(5,), low=[-1,-1,-1,-1,-1], high=[1,1,1,1,1]
  
  discretization_config:
      action_up:
          num_bins: 5
          low: [-1, 0, 0.5, 0, 0]
          high: 1
  
  Now the action space will be split where each of the 5 continuous values of the box spaces are split evenly within
  the ranges of (-1,1),(0,1),(0.5,1), (0,1), (0,1) respectively.
  
  :param env: Environment/wrapper to wrap.
  :param discretization_config: The action discretization configuration.
class_docstr_tok: ["The","DiscretizeActionsWrapper","provides","functionality","for","discretizing","individual","continuous","actions","into","discrete","ones",".","An","example","is","given","by","having","a","continuous","action","called","'action_up","'","with","space",":","gym.spaces.Box","(","shape=","(","5",",",")",",","low=","[","-1",",","-1",",","-1",",","-1",",","-1","]",",","high=","[","1,1,1,1,1","]","discretization_config",":","action_up",":","num_bins",":","5","low",":","[","-1",",","0",",","0.5",",","0",",","0","]","high",":","1","Now","the","action","space","will","be","split","where","each","of","the","5","continuous","values","of","the","box","spaces","are","split","evenly","within","the","ranges","of","(","-1,1",")",",","(","0,1",")",",","(","0.5,1",")",",","(","0,1",")",",","(","0,1",")","respectively",".",":","param","env",":","Environment\/wrapper","to","wrap",".",":","param","discretization_config",":","The","action","discretization","configuration","."]
code: def __init__(
      self,
      env: Union[StructuredEnvSpacesMixin, StructuredEnv],
      discretization_config: Dict[
          str,
          Dict[str, Union[Union[int, float], List[Union[int, float]]]],
      ],
  ):
      super().__init__(env)
      assert isinstance(self.env.action_space, gym.spaces.Dict)
      self._test_config(discretization_config)
      self.discretization_config = discretization_config
  
      self._bins: Dict[str, np.ndarray] = dict()
      self._avgs: Dict[str, np.ndarray] = dict()
  
      # Initialize the action space dict
      self._action_spaces_dict = {
          step_key: self._discretize_action_space(action_space)
          for step_key, action_space in self.env.action_spaces_dict.items()
      }
  
file_path: maze/maze/core/wrappers/discretize_actions_wrapper.py
imports: from typing import Union, Dict, List
  import gym
  import numpy
  from maze.core.annotations import override
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.env.structured_env_spaces_mixin import StructuredEnvSpacesMixin
  from maze.core.utils.structured_env_utils import flat_structured_space
  from maze.core.wrappers.wrapper import ActionWrapper, EnvType
label_desc: Use image node_id 1 to create a new DiscretizeActionsWrapper object from inherited base classes: ActionWrapper with example: obj = DiscretizeActionsWrapper(env, discretization_config)