class_docstr: Represents a d - 1 dimensional Simplex in R^d.
  
  That is, all coordinates are in [0, 1] and sum to 1.
  The dimension d of the simplex is assumed to be shape[-1].
  
  Additionally one can specify the underlying distribution of
  the simplex as a Dirichlet distribution by providing concentration
  parameters. By default, sampling is uniform, i.e. concentration is
  all 1s.
  
  Example usage:
  self.action_space = spaces.Simplex(shape=(3, 4))
      --> 3 independent 4d Dirichlet with uniform concentration
code: def __init__(self, shape, concentration=None, dtype=np.float32):
      assert type(shape) in [tuple, list]
  
      super().__init__(shape, dtype)
      self.dim = self.shape[-1]
  
      if concentration is not None:
          assert (
              concentration.shape == shape[:-1]
          ), f"{concentration.shape} vs {shape[:-1]}"
          self.concentration = concentration
      else:
          self.concentration = np.array([1] * self.dim)
  
file_path: ray/rllib/utils/spaces/simplex.py
imports: import gymnasium
  import numpy
  from ray.rllib.utils.annotations import PublicAPI
label_desc: Use image node_id 1 to create a new Simplex object from inherited base classes: gym with example: obj = Simplex(shape, concentration, dtype)