Adam Davison added the comment: Thanks for the quick response. I'm really using a pandas Series, which is effectively a numpy array behind the scenes as far as I understand, the example I pasted was just to illustrate the behaviour. So the nans are being produced elsewhere, I don't really have control over that step.
It seems like perhaps collections.Counter should handle nans as a special case. But I can appreciate the counter-arguments too. Thanks, Adam ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19161> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com