Skip to content

Commit

Permalink
test that stored zeros are still stored zeros in the diag
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Aug 17, 2017
1 parent a77a206 commit e622548
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/sparse/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,10 @@ end
@test_throws ArgumentError diag(S, size(S,2)+1)
end
end
# test that stored zeros are still stored zeros in the diagonal
S = sparse([1,3],[1,3],[0.0,0.0]); V = diag(S)
@test V.nzind == [1,3]
@test V.nzval == [0.,0.]
end

@testset "expandptr" begin
Expand Down

0 comments on commit e622548

Please sign in to comment.