Skip to content
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

k'th diagonal version of diag missing for Diagonal #9994

Closed
jakebolewski opened this issue Feb 1, 2015 · 3 comments
Closed

k'th diagonal version of diag missing for Diagonal #9994

jakebolewski opened this issue Feb 1, 2015 · 3 comments
Assignees
Labels
linear algebra Linear algebra

Comments

@jakebolewski
Copy link
Member

julia> d = Diagonal(rand(5,5))
5x5 Base.LinAlg.Diagonal{Float64}:
 0.670529  0.0       0.0       0.0       0.0
 0.0       0.755698  0.0       0.0       0.0
 0.0       0.0       0.993278  0.0       0.0
 0.0       0.0       0.0       0.155609  0.0
 0.0       0.0       0.0       0.0       0.224386

julia> diag(d)
5-element Array{Float64,1}:
 0.670529
 0.755698
 0.993278
 0.155609
 0.224386

julia> diag(d,1)
ERROR: MethodError: `similar` has no method matching similar(::Base.LinAlg.Diagonal{Float64}, ::Type{Float64}, ::(Int64,))
@jakebolewski jakebolewski self-assigned this Feb 1, 2015
@jiahao jiahao added the linear algebra Linear algebra label Feb 1, 2015
@jiahao
Copy link
Member

jiahao commented Feb 2, 2015

Again, I would prefer to see this issue resolved as part of subsuming Diagonal, Bidiagonal, SymTridiagonal and Tridiagonal into a general Banded matrix format as proposed in #8240

@jakebolewski
Copy link
Member Author

diag is also currently not defined for Symmetric or Hermitian.

This breaks trace for these matrix types as well.

@mbauman
Copy link
Member

mbauman commented Jun 12, 2015

Fixed by #10525.

@mbauman mbauman closed this as completed Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

No branches or pull requests

3 participants