code: def himmelblau(x):
      """Himmelblau's  objective function
  
      Only takes two dimensions and has a four equal global minimums
       of zero at :code:`f([3.0,2.0])`, :code:`f([-2.805118,3.131312])`,
       :code:`f([-3.779310,-3.283186])`, and :code:`f([3.584428,-1.848126])`.
      Its coordinates are bounded within :code:`[-5,5]`.
  
      Best visualized with the full domain and a range of :code:`[0,1000]`
  
      Parameters
      ----------
      x : numpy.ndarray
          set of inputs of shape :code:`(n_particles, dimensions)`
  
      Returns
      -------
      numpy.ndarray
          computed cost of size :code:`(n_particles, )`
  
      Raises
      ------
      IndexError
          When the input dimensions is greater than what the function
          allows
      ValueError
          When the input is out of bounds with respect to the function
          domain
      """
      if not x.shape[1] == 2:
          raise IndexError(
              "Himmelblau function only takes two-dimensional input."
          )
      if not np.logical_and(x >= -5, x <= 5).all():
          raise ValueError(
              "Input for Himmelblau function must be within [-5,5]."
          )
  
      x_ = x[:, 0]
      y_ = x[:, 1]
  
      j = (x_**2 + y_ - 11) ** 2 + (x_ + y_**2 - 7) ** 2
  
      return j
  
file_path: pyswarms/pyswarms/utils/functions/single_obj.py
imports: import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: himmelblau(x) and returns: j