From f83ad0f8ef665fa2fc6a12bb450ab73af61e387e Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Sat, 7 Jan 2023 12:10:35 -0500 Subject: [PATCH] Return 0.0 from mean of empty collection --- src/propeller/tools/math.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/propeller/tools/math.cljc b/src/propeller/tools/math.cljc index 574dd18..6649cf7 100755 --- a/src/propeller/tools/math.cljc +++ b/src/propeller/tools/math.cljc @@ -11,7 +11,7 @@ count (count coll)] (if (pos? count) (/ sum (float count)) - 0))) + 0.0))) (defn median [coll] (let [sorted (sort coll)