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: eigenvalues returns column vector #2915

Merged
merged 2 commits into from
Jun 29, 2023
Merged

Conversation

WardBrian
Copy link
Member

Summary

Eigen's eigensolvers return column vectors, but the current return type is set to a row vector. This causes issues such as stan-dev/stan#3199

Tests

Side Effects

Release notes

Fixed an issue with the return type of eigenvalues being incorrect

Checklist

@WardBrian WardBrian requested a review from syclik June 16, 2023 19:31
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.

"Request changes" turned on so I have a little bit of time to look at how the return types could have gotten through.

stan/math/prim/fun/eigenvalues.hpp Show resolved Hide resolved
@WardBrian
Copy link
Member Author

@syclik - anything I can do to help?

@syclik
Copy link
Member

syclik commented Jun 29, 2023

Thanks! I'm approving and let's get this merged.

I don't think this PR needs to wait any longer. I still want to see how this is happening.

After this issue, I'm even more adamant on not using auto for return types except where there's a really good reason for it. Types really provide a lot of information for the developer.

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! Thanks!!

@syclik syclik merged commit d88c95f into develop Jun 29, 2023
8 checks passed
@syclik syclik deleted the fix/eigenvalues-return-type branch June 29, 2023 19:21
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.

complex_vector assigment matching-size check sometimes broken
2 participants