NaN value breaks sorting in Python

Some time ago, I gave a talk at Boston Python meetup. Bottom line – NaN values in a list silently break sorting. Details below. NaN stands for not a number. It is a numeric data type used for undefined and unrepresentable values. For example: In [1]: a = float(‘inf’) b = float(‘inf’) In [2]: a / b […]

Read more