Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle NaN in input when sorting #27

Closed
SethMMorton opened this issue May 22, 2015 · 1 comment
Closed

Handle NaN in input when sorting #27

SethMMorton opened this issue May 22, 2015 · 1 comment

Comments

@SethMMorton
Copy link
Owner

Currently, natsort does not detect NaN in input when sorting, and as a result the output can be unexpected (see SethMMorton/fastnumbers#2). _natsort_key should be updated to detect NaN, and then either raise a ValueError, or do something like replace it with -INF or +INF depending on a user's choice.

@SethMMorton
Copy link
Owner Author

Support for this was added in 8eaa430. It was chosen to default to -INF, but the user may choose +INF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant