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

ensure that NaNs are handled correctly #40

Merged
merged 1 commit into from
Jan 7, 2025
Merged

ensure that NaNs are handled correctly #40

merged 1 commit into from
Jan 7, 2025

Conversation

jo-mueller
Copy link
Contributor

@jo-mueller jo-mueller commented Jan 7, 2025

Fixes #39

This pull request includes changes to handle NaN values in the data property of the scatter object and its associated tests. The most important changes include updating the margin calculations to use np.nanmax and np.nanmin and adding a test case to handle NaN values.

Handling NaN values:

  • src/biaplotter/artists.py: Updated margin calculations in the data property to use np.nanmax and np.nanmin instead of np.max and np.min. This ensures that NaN values are properly handled when setting the limits of the axes.

Testing NaN values:

  • src/biaplotter/_tests/test_artists.py: Added a test case to handle NaN values in the on_color_indices_changed function. This test ensures that the scatter object can handle data containing NaN values without errors.

@jo-mueller jo-mueller added the bug Something isn't working label Jan 7, 2025
@jo-mueller jo-mueller merged commit 896112b into main Jan 7, 2025
9 checks passed
@jo-mueller jo-mueller deleted the handle-NaNs branch January 7, 2025 15:16
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.26%. Comparing base (b6ebdfc) to head (f0794fb).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   89.21%   89.26%   +0.04%     
==========================================
  Files           7        7              
  Lines         649      652       +3     
==========================================
+ Hits          579      582       +3     
  Misses         70       70              

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle NaNs in plotted data
1 participant