[$] Revisiting NaNs in Python
Back in January 2020, we looked at someoddities in Python's handling of Not a Number (NaN) values inits statisticsmodule. The conversation went quiet after that, but it has beenrevived recently with an eye toward fixing the problems that were reported.As detailed in that earlier article, NaNs are rather strange beasts in thefloating-point universe, so figuring out how best to deal with theirpresence is less straightforward than it might seem.