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

None vs NaN #48

Open
dorchard opened this issue Nov 7, 2024 · 0 comments · May be fixed by #28
Open

None vs NaN #48

dorchard opened this issue Nov 7, 2024 · 0 comments · May be fixed by #28

Comments

@dorchard
Copy link
Member

dorchard commented Nov 7, 2024

We had a discussion earlier about how to deal with NaN values. In the JSON encoding, NaN is getting turned into None. We then have code that converts these back to NaN (https://github.com/Cambridge-ICCS/ONEFlux/blob/27-generate-unit-tests-for-cpdassignustar/tests/conftest.py#L73) however we still have some places, e.g., here: https://github.com/Cambridge-ICCS/ONEFlux/blob/27-generate-unit-tests-for-cpdassignustar/tests/unit_tests/test_ustar_cp/test_cpdBootstrapUStarTh4Season20100901.py#L302 where None is used. Are there any others?

My opinion is that we should preserve NaN where they appear, but we also need to remember that standard equality says that NaN == NaN is false so we need specialise equality routines if we expect NaNs...

@dorchard dorchard linked a pull request Nov 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant