class_docstr: Discretize Box space.
class_docstr_tok: ["Discretize","Box","space","."]
code: def __init__(self, space, resolution):
      spaceclassname = (
          space.__class__.__module__ + "." + space.__class__.__name__
      )
      if spaceclassname != "gym.spaces.box.Box":
          raise ValueError(
              "Space {0} incompatible with {1}. (Only supports "
              "Box space)".format(space, self)
          )
  
      assert (
          np.isscalar(resolution) or space.low.shape == resolution.shape
      )
  
      self._state_mins = space.low
      self._state_maxs = space.high
      if np.isscalar(resolution):
          self._state_resolutions = resolution + np.zeros(
              space.low.shape
          )
      else:
          self._state_resolutions = resolution
      self.num_states = int(np.prod(self._state_resolutions))
  
imports: import numpy
label_desc: Use image node_id 1 to create a new BoxSpaceDiscretizer object  with example: obj = BoxSpaceDiscretizer(space, resolution)