Skip to content

fix: Cholesky::new returns None non-positive-definite complex matrices#1592

Open
DiogoRibeiro7 wants to merge 3 commits intodimforge:mainfrom
DiogoRibeiro7:fix/cholesky-complex-non-pd
Open

fix: Cholesky::new returns None non-positive-definite complex matrices#1592
DiogoRibeiro7 wants to merge 3 commits intodimforge:mainfrom
DiogoRibeiro7:fix/cholesky-complex-non-pd

Conversation

@DiogoRibeiro7
Copy link
Copy Markdown

For complex types, always succeeds (every complex number has a square root), so non-PD matrices were silently producing garbage results. Fix by calling on the real part of each diagonal pivot instead — matching the behaviour already correct for .

Fixes #1536

197g and others added 3 commits January 4, 2026 21:33
* Add known-failing unit test case for SymmetricEigen

* Fix eigenvector calculation for subdim=2 case in SymmetricEigen
…rices

For complex types,  always succeeds (every complex number has
a square root), so non-PD matrices were silently producing garbage
results. Fix by calling  on the real part of each diagonal
pivot instead — matching the behaviour already correct for .

Fixes dimforge#1536
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.

Cholesky erroneously produces (wrong) results for non-positive-definite complex matrices

3 participants