Eigen decomposition of Diagonal matrix returns Dense eigenvectors #53007
Labels
good first issue
Indicates a good issue for first-time contributors to Julia
linear algebra
Linear algebra
Hello. I noticed today that if you have a matrix of
Diagonal
type, then the eigenvector matrix (fromeigvecs
oreigen
) is not of typeDiagonal
. Wouldn't it make more sense for the eigenvectors to match the type of the input matrix, when possible?For example, if I have
A = Diagonal(rand(10))
, theneigvecs(A;kwarg...)
should return aDiagonal
(e.g.one(A)
), buteigvecs(Matrix(A);kwarg...)
should return aMatrix
(e.g.one(Matrix(A))
), and so on. The same changes would be needed foreigen(...)
.The text was updated successfully, but these errors were encountered: