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 steven.daprano
Recipients Yoni Lavi, mark.dickinson, rhettinger, steven.daprano, taleinat, vstinner
Date 2019-12-19.11:21:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576754493.39.0.306516948018.issue39094@roundup.psfhosted.org>
In-reply-to
Content
TL;DR: I'm not likely to accept this feature request without at least one of (1) a practical use-case, (2) prior art in other statistics software, or (3) a strong mathematical justification for why this is meaningful and useful.


I'm not categorically against this idea, but it seems a bit fishy to me. If you have no data, how do you know what default value to give that would be appropriate for your (non-existent) observations?

It might help if you could show a real-life example of how, and why, you would use this, and how you would choose the default?

Another possibility would be to find prior-art: another language, library or stats calculator which already offers this feature.

Alternatively, a mathematical/statistical justification for a default. For example, the empty sum is normally taken as 0 and the empty product as 1. R returns either a NAN or NA for the empty mean (depending on precisely how you calculate it).

While I'm personally sympathetic to the nuisance factor of having to wrap code in try...except blocks (my *personal* preference would have been for mean to return NAN on empty input) I think you will need to make a stronger case than just the analogy with min and max.
History
Date User Action Args
2019-12-19 11:21:33steven.dapranosetrecipients: + steven.daprano, rhettinger, mark.dickinson, vstinner, taleinat, Yoni Lavi
2019-12-19 11:21:33steven.dapranosetmessageid: <1576754493.39.0.306516948018.issue39094@roundup.psfhosted.org>
2019-12-19 11:21:33steven.dapranolinkissue39094 messages
2019-12-19 11:21:31steven.dapranocreate