JuliaArrays / BlockDiagonals.jl

Functionality for working efficiently with block diagonal matrices.
MIT License
51 stars 11 forks source link

`svdvals` is wrong for nonsquare blocks #95

Closed mzgubic closed 2 years ago

mzgubic commented 2 years ago
julia> b_nonsq = BlockDiagonal([rand(3, 4), rand(4, 3)]);

julia> svdvals(b_nonsq)
6-element Vector{Float64}:
 2.246378413353857
 1.7899313104769115
 0.8175846160990499
 0.4445749743334662
 0.2728361345688726
 0.08535212940246302

julia> svdvals(Matrix(b_nonsq))
7-element Vector{Float64}:
 2.246378413353856
 1.7899313104769117
 0.8175846160990496
 0.444574974333466
 0.27283613456887246
 0.08535212940246334
 0.0