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 behavior if spacing >= 2 * interval #406

Merged
merged 1 commit into from
May 3, 2023
Merged

Conversation

leouieda
Copy link
Member

@leouieda leouieda commented May 3, 2023

This was a bug caused by the rounding when calculating the number of nodes in spacing_to_size. For the case where the spacing is larger than twice the interval, the size calculating rounded to zero which meant that we were getting a single value for the number of nodes. This is clearly wrong since our behavior is to change the spacing or the region to make sure we always produce at least 2 nodes in the interval.

Relevant issues/PRs:

Fixes #404

This was a bug caused by the rounding when calculating the number of
nodes in `spacing_to_size`. For the case where the spacing is larger
than twice the interval, the size calculating rounded to zero which
meant that we were getting a single value for the number of nodes. This
is clearly wrong since our behavior is to change the spacing or the
region to make sure we always produce at least 2 nodes in the interval.
@leouieda leouieda added this to the 1.8.0 milestone May 3, 2023
@leouieda leouieda merged commit 796a5c0 into main May 3, 2023
@leouieda leouieda deleted the too-large-spacing branch May 3, 2023 13:25
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.

Block reduction error when block size > coordinate variation
1 participant