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

Fix empty array handling when merging intervals #61

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

livhe
Copy link
Collaborator

@livhe livhe commented Apr 15, 2024

Calling merge_intervals(np.ndarray(shape=(0, 2))) returned a numpy array with shape (1, 2) filled with random numbers.

These changes fix that by just returning the original array in case it is empty.

@livhe livhe added the bug Something isn't working label Apr 15, 2024
Copy link
Member

@AKuederle AKuederle left a comment

Choose a reason for hiding this comment

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

Can you add a test for this? :)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.53%. Comparing base (ce60e9b) to head (a1a3fd7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #61   +/-   ##
=======================================
  Coverage   91.52%   91.53%           
=======================================
  Files          61       61           
  Lines        3281     3283    +2     
=======================================
+ Hits         3003     3005    +2     
  Misses        278      278           

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

@AKuederle AKuederle merged commit 0c022a9 into master Apr 19, 2024
10 checks passed
@AKuederle AKuederle deleted the fix_empty_array_handling_for_merging branch April 19, 2024 10:17
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.

3 participants