Skip to content

Commit

Permalink
Expand docstring of mode()
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Aug 23, 2024
1 parent 7d9b198 commit 7e0e26a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion audpsychometric/core/gold_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def mode(
``None`` and ``nan`` values are ignored per item.
If the values are numerical
and there are several winning categories,
the average over those is returned.
the average over those is returned,
and rounded to the next higher integer.
If the values are not numerical,
the first occurring value is returned.
Expand All @@ -178,6 +179,10 @@ def mode(
0
>>> mode(["a", "a", "b"])
'a'
>>> mode([0, 1])
1
>>> mode(["a", "b"])
"a"
>>> mode([0, 2])
1
>>> mode(["a", "c"])
Expand Down

0 comments on commit 7e0e26a

Please sign in to comment.