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 reed, rhettinger, steven.daprano, taleinat, xtreak
Date 2020-01-05.08:03:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578211422.29.0.389855572316.issue39218@roundup.psfhosted.org>
In-reply-to
Content
Nice analysis and bug report, thank you! That's pretty strange behaviour for float32, but I guess we're stuck with it.

I wonder if the type assertion has outlived its usefulness? I.e. drop the `T == U` part and change the assertion to `assert count == count2` only.

If we removed the failing part of the assertion, and changed the final line to `return (U, total)`, that ought to keep the exact sum but convert to float32 later, rather than float64.

I am inclined to have the stdev of float32 return a float32 is possible. What do you think?

We should check the numpy docs to see what the conversion rules for numpy floats are.
History
Date User Action Args
2020-01-05 08:03:42steven.dapranosetrecipients: + steven.daprano, rhettinger, taleinat, xtreak, reed
2020-01-05 08:03:42steven.dapranosetmessageid: <1578211422.29.0.389855572316.issue39218@roundup.psfhosted.org>
2020-01-05 08:03:42steven.dapranolinkissue39218 messages
2020-01-05 08:03:42steven.dapranocreate