Message 336007 - Python tracker (original) (raw)
[...] This keeps the signature simple (Iterable -> Scalar). [...]
Categorical, binned, or ordinal data:
mode(data: Iterable, *, first_tie=False) -> object multimode(data: Iterable) -> List[object]
This seems reasonable to me due legacy (although I really thing that multimode is just the real thing :-) )
Continuous data: mode(data: Iterable[Real]) -> Real
What should return in that case: E.g.: mode([42.0, 42.0, 42.0, 1.0, 1.0, 1.0]) ?
42.0 ? or 1.0 ? or [42.0, 1.0] ? or do I have misunderstood something ?
Thanks!