'multimodal Schwefel function with domain -500..500'

def schwefelmult(self, x, pen_fac=10000.0):

    y = ([x] if np.isscalar(x[0]) else x)
    N = len(y[0])
    f = array([((((418.9829 * N) - (1.27275661e-05 * N)) - sum((x * np.sin((np.abs(x) ** 0.5))))) + (pen_fac * sum(((abs(x) > 500) * ((abs(x) - 500) ** 2))))) for x in y])
    return (f if (len(f) > 1) else f[0])
