Skip to content

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