From c2ad613130f4650462945464b9c58fc21b7c9b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 29 Sep 2024 20:05:20 +0200 Subject: [PATCH] fix: fix absolute deviation computation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.js b/src/lib.js index 4829174..86776a0 100644 --- a/src/lib.js +++ b/src/lib.js @@ -307,7 +307,7 @@ const absoluteDeviation = (arr, aggFn) => { const value = aggFn(arr) const absoluteDeviations = [] - for (const elt in arr) { + for (const elt of arr) { absoluteDeviations.push(Math.abs(elt - value)) }