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

Suppress NaN warnings with context manager. #453

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

delucchi-cmu
Copy link
Contributor

I believe this chunk of code will cause any user-defined warnings.simplefilter or warnings.filterwarnings to be overridden, with the statement warnings.filterwarnings("default").

This instead uses a context manager, so that warnings are only ignored for those few lines, and behavior can return to normal afterward.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.14%. Comparing base (feedc15) to head (a9b5fd3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #453   +/-   ##
=======================================
  Coverage   93.14%   93.14%           
=======================================
  Files          47       47           
  Lines        2014     2014           
=======================================
  Hits         1876     1876           
  Misses        138      138           

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

Copy link

github-actions bot commented Feb 7, 2025

Before [feedc15] <v0.4.6> After [8386d7d] Ratio Benchmark (Parameter)
19.0±0.2ms 19.3±0.2ms 1.01 benchmarks.MetadataSuite.time_load_partition_info_order6
39.6±0.7ms 40.0±0.5ms 1.01 benchmarks.Suite.time_pixel_tree_creation
73.5±0.2ms 73.4±0.3ms 1 benchmarks.MetadataSuite.time_load_partition_info_order7
355±3ms 355±1ms 1 benchmarks.Suite.time_outer_pixel_alignment
1.04±0.01ms 1.04±0.03ms 1 benchmarks.time_test_cone_filter_multiple_order
73.7±0.2ms 73.0±0.2ms 0.99 benchmarks.MetadataSuite.time_load_partition_join_info
106±0.3ms 105±0.6ms 0.99 benchmarks.time_test_alignment_even_sky
13.3±0.4ms 13.0±0.4ms 0.98 benchmarks.Suite.time_inner_pixel_alignment

Click here to view all benchmarks.

@delucchi-cmu delucchi-cmu merged commit fa9f5f3 into main Feb 7, 2025
12 checks passed
@delucchi-cmu delucchi-cmu deleted the delucchi/warning branch February 7, 2025 21:20
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