class_docstr: Unordered categorical parameter, randomly choosing one of the provided choice options as a value.
  The choices can be Parameters, in which case there value will be returned instead.
  The chosen parameter is drawn randomly from the softmax of weights which are
  updated during the optimization.
  
  Parameters
  ----------
  choices: list or int
      a list of possible values or Parameters for the variable (or an integer as a shortcut for range(num))
  repetitions: None or int
      set to an integer :code:`n` if you want :code:`n` similar choices sampled independently (each with its own distribution)
      This is equivalent to :code:`Tuple(*[Choice(options) for _ in range(n)])` but can be
      30x faster for large :code:`n`.
  deterministic: bool
      whether to always draw the most likely choice (hence avoiding the stochastic behavior, but loosing
      continuity)
  
  Note
  ----
  - Since the chosen value is drawn randomly, the use of this variable makes deterministic
    functions become stochastic, hence "adding noise"
  - the "mutate" method only mutates the weights and the chosen Parameter (if it is not constant),
    leaving others untouched
  
  Examples
  --------
  
  >>> print(Choice(["a", "b", "c", "e"]).value)
  "c"
  
  >>> print(Choice(["a", "b", "c", "e"], repetitions=3).value)
  ("b", "b", "c")
code: def __init__(
      self,
      choices: tp.Union[int, tp.Iterable[tp.Any]],
      repetitions: tp.Optional[int] = None,
      deterministic: bool = False,
  ) -> None:
      lchoices = list(
          choices if not isinstance(choices, int) else range(choices)
      )
      rep = 1 if repetitions is None else repetitions
      indices = Array(shape=(rep, len(lchoices)), mutable_sigma=False)
      indices.add_layer(
          _datalayers.SoftmaxSampling(
              len(lchoices), deterministic=deterministic
          )
      )
      super().__init__(
          choices=lchoices,
          repetitions=repetitions,
          indices=indices,
      )
      self._indices: tp.Optional[np.ndarray] = None
  
imports: import numpy
  import nevergrad.common.typing
  from .None import discretization
  from .None import core
  from .None import container
  from .None import _datalayers
  from .data import Array
label_desc: Use image node_id 1 to create a new Choice object from inherited base classes: BaseChoice with example: obj = Choice(choices, repetitions, deterministic)