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 missing squareness check in cholesky functions #3012

Merged
merged 3 commits into from
Jan 27, 2024

Conversation

WardBrian
Copy link
Member

@WardBrian WardBrian commented Jan 25, 2024

Summary

#3007 introduced a few bugs by assuming check_cholesky_factor internally called check_square. This re-adds the missing checks.

Tests

Side Effects

Release notes

Fixed a few additional issues in checking the inputs to distributions defined over cholesky matrices.

Checklist

  • Copyright holder: Simons Foundation

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
    - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
    - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • the basic tests are passing

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

syclik
syclik previously approved these changes Jan 25, 2024
Copy link
Member

@syclik syclik left a comment

Choose a reason for hiding this comment

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

LGTM!

@WardBrian WardBrian marked this pull request as draft January 26, 2024 01:46
@WardBrian WardBrian changed the title Fix exception in inv_wishart_cholesky test Fix missing squareness check in cholesky functions Jan 26, 2024
@WardBrian WardBrian marked this pull request as ready for review January 26, 2024 14:38
@WardBrian WardBrian requested a review from syclik January 26, 2024 14:38
@WardBrian
Copy link
Member Author

This is probably worth a .2 release, which might mean another dance with a staging branch

Copy link
Member

@syclik syclik left a comment

Choose a reason for hiding this comment

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

THANK YOU!!!

Copy link
Collaborator

@spinkney spinkney left a comment

Choose a reason for hiding this comment

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

looks good!

@spinkney
Copy link
Collaborator

@WardBrian do we want to add #3010 to the 0.2 release? It's a pretty small change but isn't a fix so may go against our release policy.

@WardBrian
Copy link
Member Author

Perhaps it’s just me being gun shy, but I don’t want to take any action which would even minority increase the odds of needing a .3

@syclik syclik merged commit db2a0b3 into develop Jan 27, 2024
8 checks passed
@syclik syclik deleted the fix/inv-wishart-cholesky-test-exn branch January 27, 2024 19:15
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.

None yet

4 participants