Author rhettinger
Recipients francismb, rhettinger, steven.daprano
Date 2019-02-16.10:48:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I would stick with "first_tie=False".  That caters to the common case, avoids API complications, and does something similar to what other stats packages are doing.

----- API Survey ----

Maple: """This function is only guaranteed to return one potential mode - in cases where multiple modes exist, only the first detected mode is guaranteed to be returned.""" --

R: 'R does not have a standard in-built function to calculate mode.' --

Matlab: "When there are multiple values occurring equally frequently, mode returns the smallest of those values. ... If A is an empty 0-by-0 matrix, mode(A) returns NaN." --

Mathematica: "The mode of a set of data is implemented in the Wolfram Language as Commonest[data]. ... When several elements occur with equal frequency, Commonest[list,…] picks first the ones that occur first in list." -- and

SciPy: "If there is more than one such value, only the smallest is returned." --

SAS: "Most frequent value (if not unique, the smallest mode)" --
Date User Action Args
2019-02-16 10:48:06rhettingersetrecipients: + rhettinger, steven.daprano, francismb
2019-02-16 10:48:06rhettingersetmessageid: <>
2019-02-16 10:48:06rhettingerlinkissue35892 messages
2019-02-16 10:48:06rhettingercreate