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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix int overflow in MAP #1607

Merged
merged 3 commits into from Mar 10, 2023
Merged

Fix int overflow in MAP #1607

merged 3 commits into from Mar 10, 2023

Conversation

SkafteNicki
Copy link
Member

What does this PR do?

Fixes #1594
A corner case in MAP metric where a big area is calculated and it then fails on a specific check comparison with an int because the value would overflow on comparison. Fixes by initializing as float.

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 馃檭

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Mar 10, 2023
@SkafteNicki SkafteNicki added this to the v0.12 milestone Mar 10, 2023
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #1607 (e9fc0f3) into master (632e8e6) will decrease coverage by 51%.
The diff coverage is 71%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1607     +/-   ##
========================================
- Coverage      88%     38%    -51%     
========================================
  Files         226     226             
  Lines       11992   12029     +37     
========================================
- Hits        10601    4559   -6042     
- Misses       1391    7470   +6079     

@Borda Borda enabled auto-merge (squash) March 10, 2023 10:57
@Borda Borda requested review from stancld and a team March 10, 2023 10:58
@mergify mergify bot added the ready label Mar 10, 2023
@Borda Borda merged commit ac59cdc into master Mar 10, 2023
@Borda Borda deleted the bugfix/dtype_map branch March 10, 2023 18:10
Borda pushed a commit that referenced this pull request Mar 10, 2023
(cherry picked from commit ac59cdc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeError: value cannot be converted to type int without overflow
3 participants