Skip to content

Commit

Permalink
Add tests for *cat involving sparse is sparse, and that dense *cat is…
Browse files Browse the repository at this point in the history
… still dense.
  • Loading branch information
pkofod committed Feb 29, 2016
1 parent 86f89ee commit 31f0b7d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/sparsedir/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1282,3 +1282,17 @@ let
@test issparse(UpperTriangular(full(m))) == false
@test issparse(LinAlg.UnitUpperTriangular(full(m))) == false
end

# dense sparse concatenation -> sparse return type
@test issparse([sprand(10,10,.1) rand(10,10)])
@test issparse([sprand(10,10,.1); rand(10,10)])
@test issparse([sprand(10,10,.1) rand(10,10); rand(10,10) rand(10,10)])
#---
# Matrix vector cat not supported for sparse #13130
#@test issparse([sprand(10,10,.1) rand(10)])
#@test issparse([sprand(10,10,.1) sprand(10,.1)])
# ---
@test !issparse([rand(10,10) rand(10,10)])
@test !issparse([rand(10,10); rand(10,10)])
@test !issparse([rand(10,10) rand(10,10); rand(10,10) rand(10,10)])

0 comments on commit 31f0b7d

Please sign in to comment.