Open dorchard opened 2 weeks ago
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?
NaN
None
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...
NaN == NaN
We had a discussion earlier about how to deal with
NaN
values. In the JSON encoding,NaN
is getting turned intoNone
. We then have code that converts these back toNaN
(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 whereNone
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 thatNaN == NaN
is false so we need specialise equality routines if we expect NaNs...