Skip to content

Add improved comparing when dealing with NAN values#111

Merged
huppd merged 4 commits into
MeteoSwiss:mainfrom
muellch:nan-non-nan-check
Jun 26, 2026
Merged

Add improved comparing when dealing with NAN values#111
huppd merged 4 commits into
MeteoSwiss:mainfrom
muellch:nan-non-nan-check

Conversation

@muellch

@muellch muellch commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

A value present (non-NaN) in one file but missing (NaN) in the other is a real difference -- a field or observation appeared or disappeared. The relative diff is NaN there and check_variable would treat NaN as within tolerance, silently passing it; force those cells to fail. Both-NaN stays NaN (and passes), since both being missing means they are equal.

@huppd huppd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this nice improvement. This increases the quality of probtesting.
I only have one minor suggestion for the commends and would be greate if you could run pre-commit once more.
And please add yourself to the author list.

Comment thread tests/engine/test_check.py Outdated
muellch and others added 2 commits June 25, 2026 10:08
Co-authored-by: Daniel Hupp <daniel.hupp@meteoswiss.ch>
@huppd huppd changed the title If a nan is compared with a non-nan, error is inf Add improved comparing when dealing with NAN values Jun 25, 2026
huppd
huppd previously approved these changes Jun 25, 2026
Comment thread AUTHORS.md Outdated
Co-authored-by: Daniel Hupp <daniel.hupp@meteoswiss.ch>
@huppd huppd merged commit 4dc950f into MeteoSwiss:main Jun 26, 2026
2 checks passed
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 this pull request may close these issues.

2 participants