Skip to content

Commit

Permalink
Update datalist.go
Browse files Browse the repository at this point in the history
  • Loading branch information
TimLai666 committed Sep 14, 2024
1 parent 88db8a2 commit 56e08d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datalist.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 56e08d8

Please sign in to comment.