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

testing: assert_allclose with allowed failures #563

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

mathause
Copy link
Member

A helper function to check if two arrays are close, but allows a number of failures. This could help with #501 where most of the array is close but some points are not & expect this could become more important? Uses the numpy machinery, thus does not work with xarray. However, there is no isclose function for DataArray and Dataset and xr.testing.assert_allclose is a mess.

See also np.testing.assert_allclose??

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.45%. Comparing base (f4c286c) to head (f8231fa).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
- Coverage   77.39%   76.45%   -0.95%     
==========================================
  Files          48       48              
  Lines        2920     2930      +10     
==========================================
- Hits         2260     2240      -20     
- Misses        660      690      +30     
Flag Coverage Δ
unittests 76.45% <100.00%> (-0.95%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mathause mathause merged commit f548d50 into MESMER-group:main Nov 13, 2024
8 of 10 checks passed
@mathause mathause deleted the assert_allclose_allowed_failures branch November 13, 2024 12:12
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