code: def matyas(x):
      """Matyas objective function
  
      Only takes two dimensions and has a global minimum at
      :code:`f([0,0])`. Its coordinates are bounded within
      :code:`[-10,10]`.
  
      Parameters
      ----------
      x : numpy.ndarray
          set of inputs of shape :code:`(n_particles, dimensions)`
  
      Returns
      -------
      numpy.ndarray
      """
      if not x.shape[1] == 2:
          raise IndexError(
              "Matyas function only takes two-dimensional input."
          )
      if not np.logical_and(x >= -10, x <= 10).all():
          raise ValueError(
              "Input for Matyas function must be within " "[-10, 10]."
          )
  
      x_ = x[:, 0]
      y_ = x[:, 1]
      j = 0.26 * (x_**2.0 + y_**2.0) - 0.48 * x_ * y_
  
      return j
  
file_path: pyswarms/pyswarms/utils/functions/single_obj.py
imports: import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: matyas(x) and returns: j