-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add a trivial case for eigen values and vectors #3017
Conversation
This is not ultimate bug fix nor solution. It still needs much more testing, but this should solve most general case / bug |
@been-jamming @nguyenvukhang if you could check if this patch solves your issues / give more examples where it does not work. Thanks Also if you have explanation/ideas on to how case like Also if you maybe know the general solution for knowing if it should be transposed (in case of [[1, 2], [4, 3]]) Other than these two cases I don't think I had strange results |
@bartekleon From what I can see, it looks like you have added a special case for computing the eigenvectors and eigenvalues of a 2x2 matrix? I ran into the issue when computing eigenvalues of much larger matrices, so I'm not sure if this is a good solution.
If there is only one eigenvalue and one eigenvector, then
I'm not sure what you mean by this. I mixed up the matrix and its transpose when I created the issue.
I ran into the issue when computing the eigenvectors of a 101x101 matrix, so I think there is something larger wrong with the algorithm used to compute the eigenvectors. In all cases I've tested, the eigenvalues have been correct. |
#2879 is a problem at all matrix sizes, so again I don't think adding a special case for 2x2 is the answer. Recommend closing this PR. |
Moreover, this PR duplicates the identical function eigenvalues2x2 between complexEigs.js and trivialCase.js, which would have to be fixed if it were to move forward. |
Agree, I think handling one special case for 2x2 matrices doesn't solve the issue in general. I'll close this PR now. Thanks anyway for working out this PR @bartekleon and thinking along to find a solution! |
partially fixes #3014 #2879