From 578df3d3615c428794ec605b13ac6bf12ff18e79 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 9 Feb 2023 03:14:06 +0100 Subject: [PATCH] cec2020: use make() for weights --- bench/cec2020/benchFunctions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench/cec2020/benchFunctions.go b/bench/cec2020/benchFunctions.go index b4e5ca4..9359ea6 100644 --- a/bench/cec2020/benchFunctions.go +++ b/bench/cec2020/benchFunctions.go @@ -176,7 +176,7 @@ func Composition1(x []float64) float64 { var sum float64 - var weights []float64 + weights := make([]float64, len(funcs)) for i := range funcs { wi := getWeight(x, o, sigma[i], fnx)