class_docstr: Parameter representing a positive variable, mutated by Gaussian mutation in log-scale.
  
  Parameters
  ----------
  init: float or None
      initial value of the variable. If not provided, it is set to the middle of lower and upper in log space
  exponent: float or None
      exponent for the log mutation: an exponent of 2.0 will lead to mutations by factors between around 0.5 and 2.0
      By default, it is set to either 2.0, or if the parameter is completely bounded to a factor so that bounds are
      at 3 sigma in the transformed space.
  lower: float or None
      minimum value if any (> 0)
  upper: float or None
      maximum value if any
  mutable_sigma: bool
      whether the mutation standard deviation must mutate as well (for mutation based algorithms)
  
  Note
  ----
  This class is only a wrapper over :code:`Scalar`.
class_docstr_tok: ["Parameter","representing","a","positive","variable",",","mutated","by","Gaussian","mutation","in","log-scale",".","Parameters","--","--","--","--","--","init",":","float","or","None","initial","value","of","the","variable",".","If","not","provided",",","it","is","set","to","the","middle","of","lower","and","upper","in","log","space","exponent",":","float","or","None","exponent","for","the","log","mutation",":","an","exponent","of","2.0","will","lead","to","mutations","by","factors","between","around","0.5","and","2.0","By","default",",","it","is","set","to","either","2.0",",","or","if","the","parameter","is","completely","bounded","to","a","factor","so","that","bounds","are","at","3","sigma","in","the","transformed","space",".","lower",":","float","or","None","minimum","value","if","any","(",">","0",")","upper",":","float","or","None","maximum","value","if","any","mutable_sigma",":","bool","whether","the","mutation","standard","deviation","must","mutate","as","well","(","for","mutation","based","algorithms",")","Note","--","--","This","class","is","only","a","wrapper","over",":","code",":","`","Scalar","`","."]
code: def __init__(
      self,
      *,
      init: tp.Optional[float] = None,
      exponent: tp.Optional[float] = None,
      lower: tp.Optional[float] = None,
      upper: tp.Optional[float] = None,
      mutable_sigma: bool = False,
  ) -> None:
      no_init = init is None
      bounded = all(a is not None for a in (lower, upper))
      if bounded:
          if init is None:
              init = float(np.sqrt(lower * upper))  # type: ignore
          if exponent is None:
              exponent = float(
                  np.exp((np.log(upper) - np.log(lower)) / 6.0)  # type: ignore
              )  # 99.7% of values within the bounds
      if init is None:
          raise ValueError(
              "You must define either a init value or both lower and upper bounds"
          )
      if exponent is None:
          exponent = 2.0
      from . import _datalayers
  
      exp_layer = _datalayers.Exponent(exponent)
      raw_bounds = tuple(
          None if x is None else np.array([x], dtype=float)
          for x in (lower, upper)
      )
      bounds = tuple(
          None if x is None else exp_layer.backward(x)
          for x in raw_bounds
      )
      init = exp_layer.backward(np.array([init]))
      super().__init__(init=init[0], mutable_sigma=mutable_sigma)  # type: ignore
      # TODO remove the next line when all compatibility is done
      if any(x is not None for x in bounds):
          bound_layer = _datalayers.Bound(*bounds, uniform_sampling=bounded and no_init)  # type: ignore
          bound_layer(self, inplace=True)
      self.add_layer(exp_layer)
  
imports: import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from .None import _layering
  from .None import core
  from .container import Dict
  from .None import utils
label_desc: Use image node_id 1 to create a new Log object from inherited base classes: Scalar with example: obj = Log()