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

median_absolute_deviation bug fix for non-zero center #997

Merged

Conversation

rasmushenningsson
Copy link
Contributor

This fixes a bug in median_absolute_deviation causing incorrect answers when a non-zero center is used. (Note that the default center is the median, not zero, so this bug should affect most users of median_absolute_deviation.)

This pull request also provides unit tests for the non-zero center case.

Add unit tests for median_absolute_deviation with center=median.
Fix bug causing median_absolute_deviation to return incorrect values
when a non-zero center (such as median which is the default) was used.
Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for this. I approved the CI run; you can ignore the CircleCI failure.

@NAThompson
Copy link
Collaborator

NAThompson commented Jun 16, 2023

@rasmushenningsson : Sincerest thanks for fixing this-at this point I shouldn't be surprised by the sheer stupidity of the mistakes I make . . . but for this was I was!

@rasmushenningsson
Copy link
Contributor Author

We all make mistakes. 🙂
Thanks for the quick responses and all your work on boost::math!

@mborland mborland merged commit 0852c16 into boostorg:develop Jun 19, 2023
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.

3 participants