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

Fixes for bound_range utility #1603

Merged
merged 2 commits into from
Jun 25, 2017
Merged

Fixes for bound_range utility #1603

merged 2 commits into from
Jun 25, 2017

Conversation

philippjfr
Copy link
Member

Since the introduction of ndloc the precise numerical precision of Image coordinates is not a real issue anymore. This PR drops the rounding that we previously applied to the density based on the system float precision. This means that Image can handle very small values, which are currently rounded to zero. I've also filtered some warnings.

@philippjfr
Copy link
Member Author

Looks like there's a test failure here:

AssertionError: 2.9999999999999996 != 3

Suppose this is expected but we need to decide whether nicely rounded density values are more important than handling very small value ranges, which a user reported issues with.

@jlstevens
Copy link
Contributor

Suppose this is expected but we need to decide whether nicely rounded density values are more important than handling very small value ranges, which a user reported issues with.

Any way to detect tiny ranges in which case rounding should be disabled?

@jlstevens
Copy link
Contributor

Fix makes sense to me: if after rounding you get zero, use the full precision. if this works correctly, I am happy to merge.

@philippjfr
Copy link
Member Author

Great, ready to merge then.

@jlstevens jlstevens merged commit d279718 into master Jun 25, 2017
@philippjfr philippjfr deleted the image_bound_compute branch July 31, 2017 22:58
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