docs: def rastrigin(self, x):
          """Rastrigin test objective function"""
          if not isscalar(x[0]):
              N = len(x[0])
              return [10 * N + sum(xi**2 - 10 * np.cos(2 * np.pi * xi)) for xi in x]
              # return 10*N + sum(x**2 - 10*np.cos(2*np.pi*x), axis=1)
          N = len(x)
          return 10 * N + sum(x**2 - 10 * np.cos(2 * np.pi * x))