From 56e08d8aff9fd059d4108a6caeeef9a65f504f08 Mon Sep 17 00:00:00 2001 From: TimLai666 <43640816+TimLai666@users.noreply.github.com> Date: Sat, 14 Sep 2024 16:55:56 +0800 Subject: [PATCH] Update datalist.go --- datalist.go | 1 + 1 file changed, 1 insertion(+) diff --git a/datalist.go b/datalist.go index b8404ea..4736d58 100644 --- a/datalist.go +++ b/datalist.go @@ -1311,6 +1311,7 @@ func (dl *DataList) Median() float64 { } // Mode calculates the mode of the DataList. +// Only works with numeric data types. // Returns math.NaN() if the DataList is empty or if no valid elements can be used. func (dl *DataList) Mode() float64 { if len(dl.data) == 0 {