Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

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.""" -- 
https://www.maplesoft.com/support/help/maple/view.aspx?path=Statistics%2fMode

R: 'R does not have a standard in-built function to calculate mode.' -- 
https://www.tutorialspoint.com/r/r_mean_median_mode.htm

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." -- https://www.mathworks.com/help/matlab/ref/mode.html

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." -- 
http://mathworld.wolfram.com/Mode.html and 
https://reference.wolfram.com/language/ref/Commonest.html

SciPy: "If there is more than one such value, only the smallest is returned." 
-- 
https://docs.scipy.org/doc/scipy-0.19.1/reference/generated/scipy.stats.mode.html

SAS: "Most frequent value (if not unique, the smallest mode)" -- 
https://documentation.sas.com/?docsetId=qcug&docsetTarget=qcug_capability_sect225.htm&docsetVersion=14.2&locale=en

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35892>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to