|
82 | 82 | SparseMatrixCSC(6, 6, big.([1,2,4,7,8,9,9]), big.([1,1,2,1,2,3,4,5]), big.([1,2,3,4,5,6,7,8])))
|
83 | 83 | @test sparse(Any[1,2,3], Any[1,2,3], Any[1,1,1]) == sparse([1,2,3], [1,2,3], [1,1,1])
|
84 | 84 | @test sparse(Any[1,2,3], Any[1,2,3], Any[1,1,1], 5, 4) == sparse([1,2,3], [1,2,3], [1,1,1], 5, 4)
|
| 85 | + # with combine |
| 86 | + @test sparse([1, 1, 2, 2, 2], [1, 2, 1, 2, 2], 1.0, 2, 2, +) == sparse([1, 1, 2, 2], [1, 2, 1, 2], [1.0, 1.0, 1.0, 2.0], 2, 2) |
| 87 | + @test sparse([1, 1, 2, 2, 2], [1, 2, 1, 2, 2], -1.0, 2, 2, *) == sparse([1, 1, 2, 2], [1, 2, 1, 2], [-1.0, -1.0, -1.0, 1.0], 2, 2) |
85 | 88 | end
|
86 | 89 |
|
87 | 90 | @testset "SparseMatrixCSC construction from UniformScaling" begin
|
@@ -2518,6 +2521,7 @@ end
|
2518 | 2521 | @test permutedims(S, (2,1)) == SP
|
2519 | 2522 | @test permutedims(S, (1,2)) == S
|
2520 | 2523 | @test permutedims(S, (1,2)) !== S
|
| 2524 | + @test_throws ArgumentError permutedims(S, (1,3)) |
2521 | 2525 | MC = reshape([[(1+im) 2; 3 4], [9 10; 11 12], [(5 + 2im) 6; 7 8], [13 14; 15 16]], (2,2))
|
2522 | 2526 | SC = sparse(MC)
|
2523 | 2527 | @test isa(adjoint(SC), Adjoint)
|
|
0 commit comments