class_docstr: Decorator for evaluation functions, it evaluates the objective function
  and adds noise by calling the function(s) provided in the *noise*
  argument. The noise functions are called without any argument, consider
  using the :class:`~deap.base.Toolbox` or Python's
  :func:`functools.partial` to provide any required argument. If a single
  function is provided it is applied to all objectives of the evaluation
  function. If a list of noise functions is provided, it must be of length
  equal to the number of objectives. The noise argument also accept
  :obj:`None`, which will leave the objective without noise.
  
  This decorator adds a :func:`noise` method to the decorated
  function.
class_docstr_tok: ["Decorator","for","evaluation","functions",",","it","evaluates","the","objective","function","and","adds","noise","by","calling","the","function","(","s",")","provided","in","the","*","noise","*","argument",".","The","noise","functions","are","called","without","any","argument",",","consider","using","the",":","class",":","`","~deap.base.Toolbox","`","or","Python's",":","func",":","`","functools.partial","`","to","provide","any","required","argument",".","If","a","single","function","is","provided","it","is","applied","to","all","objectives","of","the","evaluation","function",".","If","a","list","of","noise","functions","is","provided",",","it","must","be","of","length","equal","to","the","number","of","objectives",".","The","noise","argument","also","accept",":","obj",":","`","None","`",",","which","will","leave","the","objective","without","noise",".","This","decorator","adds","a",":","func",":","`","noise","`","method","to","the","decorated","function","."]
docstr: Set the current noise to *noise*. After decorating the
  evaluation function, this function will be available directly from
  the function object. ::
  
      prand = functools.partial(random.gauss, mu=0.0, sigma=1.0)
  
      @noise(prand)
      def evaluate(individual):
          return sum(individual),
  
      # This will remove noise from the evaluation function
      evaluate.noise(None)
docstr_tok: ["Set","the","current","noise","to","*","noise","*",".","After","decorating","the","evaluation","function",",","this","function","will","be","available","directly","from","the","function","object",".",":",":","prand","=","functools.partial","(","random.gauss",",","mu=0.0",",","sigma=1.0",")","@","noise","(","prand",")","def","evaluate","(","individual",")",":","return","sum","(","individual",")",",","#","This","will","remove","noise","from","the","evaluation","function","evaluate.noise","(","None",")"]
code: def noise(self, noise):
      """Set the current noise to *noise*. After decorating the
      evaluation function, this function will be available directly from
      the function object. ::
  
          prand = functools.partial(random.gauss, mu=0.0, sigma=1.0)
  
          @noise(prand)
          def evaluate(individual):
              return sum(individual),
  
          # This will remove noise from the evaluation function
          evaluate.noise(None)
      """
      try:
          self.rand_funcs = tuple(noise)
      except TypeError:
          self.rand_funcs = repeat(noise)
  
imports: from math import hypot, sqrt
  from functools import wraps
  from itertools import repeat
label_desc: Use image node_id 3 for calling the noise obj's underlying member method code with example usage: obj.noise(noise) without return types