class_docstr: Levy 3 objective function.
  
  This class defines the Levy 3 [1]_ global optimization problem. This
  is a multimodal minimization problem defined as follows:
  
  .. math::
  
      f_{\text{Levy03}}(\mathbf{x}) =
      \sin^2(\pi y_1)+\sum_{i=1}^{n-1}(y_i-1)^2[1+10\sin^2(\pi y_{i+1})]+(y_n-1)^2
  
  Where, in this exercise:
  
  .. math::
  
      y_i=1+\frac{x_i-1}{4}
  
  
  Here, :math:`n` represents the number of dimensions and
  :math:`x_i \in [-10, 10]` for :math:`i=1,...,n`.
  
  *Global optimum*: :math:`f(x_i) = 0` for :math:`x_i = 1` for :math:`i=1,...,n`
  
  .. [1] Mishra, S. Global Optimization by Differential Evolution and
  Particle Swarm Methods: Evaluation on Some Benchmark Functions.
  Munich Personal RePEc Archive, 2006, 1005
  
  TODO: not clear what the Levy function definition is.  Gavana, Mishra,
  Adorio have different forms. Indeed Levy 3 docstring from Gavana
  disagrees with the Gavana code!  The following code is from the Mishra
  listing of Levy08.
class_docstr_tok: ["Levy","3","objective","function",".","This","class","defines","the","Levy","3","[","1","]","_","global","optimization","problem",".","This","is","a","multimodal","minimization","problem","defined","as","follows",":","..","math",":",":","f_","{","\\text","{","Levy03","}","}","(","\\mathbf","{","x","}",")","=","\\sin^2","(","\\pi","y_1",")","+\\sum_","{","i=1","}","^","{","n-1","}","(","y_i-1",")","^2","[","1+10\\sin^2","(","\\pi","y_","{","i+1","}",")","]","+","(","y_n-1",")","^2","Where",",","in","this","exercise",":","..","math",":",":","y_i=1+\\frac","{","x_i-1","}","{","4","}","Here",",",":","math",":","`","n","`","represents","the","number","of","dimensions","and",":","math",":","`","x_i","\\in","[","-10",",","10","]","`","for",":","math",":","`","i=1",",","...",",","n","`",".","*","Global","optimum","*",":",":","math",":","`","f","(","x_i",")","=","0","`","for",":","math",":","`","x_i","=","1","`","for",":","math",":","`","i=1",",","...",",","n","`","..","[","1","]","Mishra",",","S.","Global","Optimization","by","Differential","Evolution","and","Particle","Swarm","Methods",":","Evaluation","on","Some","Benchmark","Functions",".","Munich","Personal","RePEc","Archive",",","2006",",","1005","TODO",":","not","clear","what","the","Levy","function","definition","is",".","Gavana",",","Mishra",",","Adorio","have","different","forms",".","Indeed","Levy","3","docstring","from","Gavana","disagrees","with","the","Gavana","code","!","The","following","code","is","from","the","Mishra","listing","of","Levy08","."]
code: def fun(self, x, *args):
      self.nfev += 1
  
      y = 1 + (x - 1) / 4
      v = sum((y[:-1] - 1) ** 2 * (1 + 10 * sin(pi * y[1:]) ** 2))
      z = (y[-1] - 1) ** 2
      return sin(pi * y[0]) ** 2 + v + z
  
imports: from numpy import sum, cos, exp, pi, arange, sin
  from .go_benchmark import Benchmark
label_desc: Use image node_id 2 for calling the Levy03 obj's underlying member method code with example usage: obj.fun(x) and returns: unknown