This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients sria91, steven.daprano, terry.reedy, wolma
Date 2016-12-17.00:22:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481934150.27.0.0422978425118.issue28956@psf.upfronthosting.co.za>
In-reply-to
Content
Srikanth, when you reply by email, please remove the quotation of the previous message.  On the web page, it is just noise.  The only exception should be when you reply to a specific sentence and need to quote that sentence for context.

In my particular experience, mode() is unusally reserved for crudely describing unordered categorical data, where the concept of 'minimum' does not apply.

Mode is useful for determining the winner of a vote (or other decision process), but in general, it is not a substitute for a more comprehensive look at a dataset.

Problems with possibly returning a tuple of data items instead of a data item include:

1. The user then has to be prepared to handle a tuple instead of a data item.  It would be better then to always return a tuple, even for 1 item.

2. Data items can be tuples, making a tuple return ambiguous.  Example use case: planar points with int coordinates.

>>> mode(((0,0), (0,0), (0,1)))
(0, 0)

So, while StatisticsError is a nuisance, so are the apparent alternatives.  I think we should leave mode alone and close this.
History
Date User Action Args
2016-12-17 00:22:30terry.reedysetrecipients: + terry.reedy, steven.daprano, wolma, sria91
2016-12-17 00:22:30terry.reedysetmessageid: <1481934150.27.0.0422978425118.issue28956@psf.upfronthosting.co.za>
2016-12-17 00:22:30terry.reedylinkissue28956 messages
2016-12-17 00:22:29terry.reedycreate