Message359325
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. |
|
Date |
User |
Action |
Args |
2020-01-05 08:03:42 | steven.daprano | set | recipients:
+ steven.daprano, rhettinger, taleinat, xtreak, reed |
2020-01-05 08:03:42 | steven.daprano | set | messageid: <1578211422.29.0.389855572316.issue39218@roundup.psfhosted.org> |
2020-01-05 08:03:42 | steven.daprano | link | issue39218 messages |
2020-01-05 08:03:42 | steven.daprano | create | |
|