-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve types when adding/subtracting Herm/Sym/UniformScaling (#29500)
* Preserve types when adding/subtracting Herm/Sym/UniformScaling * Make `real(::SymOrHerm{<:Real})` consistent with `real(::Array)`. * Fix embarrassing ambiguity * More tests, remove imag(::Hermitian), simplify code * Remove `.λ`
- Loading branch information
1 parent
640b155
commit 49023b5
Showing
4 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is missing the
conj=true
argument, so it gives the wrong answer for complex-Hermitian matrices (which weren't covered by the tests).Incidentally, it also makes an extra copy of the matrix if the result type is different from
eltype(A)
.I'll file a PR shortly with a bugfix and a test.