forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change eigvals(::Number) to return a scalar (JuliaLang#27730)
This is a proposal for how eigvals could return a scalar when given a scalar input, in line with what svdvals does. (See issue #27687) Promotion to float is also skipped. (Just like svdvals, eigvals will now return an integer for scalar real integer input.) For complex scalar input, the return type will depend on whether the imaginary component is zero, as before. Since Julia allows indexing into, and iterating over, a scalar as if it were a length-1 vector, this change should have minimal effect on existing code.
- Loading branch information
1 parent
948b088
commit 41d7bcc
Showing
2 changed files
with
13 additions
and
6 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