Author francismb
Recipients francismb, rhettinger, steven.daprano
Date 2019-02-16.11:28:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Good point Raymond!

Only a minor observation on the packages API:  

[1] SciPy: scipy.stats.mode(a, axis=0, nan_policy='propagate')
"Returns an array of the modal (most common) **value** in the passed array." --> Here it claims to return just ONE value

And use of different policies on parameters :
nan_policy : {‘propagate’, ‘raise’, ‘omit’}, optional
Defines how to handle when input contains nan. ‘propagate’ returns nan, ‘raise’ throws an error, ‘omit’ performs the calculations ignoring nan values. Default is ‘propagate’.

Equivalent one could say 'multivalue_policy'

[2] Matlab: Mode: "Most frequent **values** in array"

...returns the sample mode of A, which is the most frequently occurring *value* in A...."

IMHO it seems inconsistent *values* vs. *value* (or a doc-bug ?).

An a question:
Does it that mean that mode in that case really should potentially return an array of values, e.g. all the values with equal frequency?

In that case the user has the chance to get the first, the last or just all, ...


Date User Action Args
2019-02-16 11:28:23francismbsetrecipients: + francismb, rhettinger, steven.daprano
2019-02-16 11:28:23francismbsetmessageid: <>
2019-02-16 11:28:23francismblinkissue35892 messages
2019-02-16 11:28:23francismbcreate