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: Correct precedence issue in NeutronSQ Averaging #2029

Closed
wants to merge 1 commit into from

Conversation

rprospero
Copy link
Contributor

@rprospero rprospero commented Dec 16, 2024

I got a warning about this line in NeutronSQ module. Since divide binds faster than comparison, we're taking the inverse of an enum and comparison that to another enum, which I'm pretty sure is not the intended action.

If the original code is correct, it could use some documentation to explain the logic. As I read it now, it looks like we always get the average of squares.

@rprospero rprospero requested a review from trisyoungs December 16, 2024 18:17
Copy link
Member

@trisyoungs trisyoungs left a comment

Choose a reason for hiding this comment

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

Yep, that was indeed a problem. We don't tend to generate data with normalisation applied, so this would have largely gone unnoticed.

@trisyoungs
Copy link
Member

@rprospero Ah - this is where this fix was previously made! It has already been merged into develop by #2035 so this PR can be closed.

@rprospero rprospero closed this Jan 23, 2025
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