File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 11name = " BlockDiagonals"
22uuid = " 0a1fb500-61f7-11e9-3c65-f5ef3456f9f0"
33authors = [" Invenia Technical Computing Corporation" ]
4- version = " 0.1.35 "
4+ version = " 0.1.36 "
55
66[deps ]
77ChainRulesCore = " d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Original file line number Diff line number Diff line change 6666# # Subtraction
6767Base.:- (B:: BlockDiagonal ) = BlockDiagonal (.- (blocks (B)))
6868Base.:- (M:: AbstractMatrix , B:: BlockDiagonal ) = M + - B
69+ Base.:- (B:: BlockDiagonal , M:: AbstractMatrix ) = - M + B
70+ Base.:- (B:: BlockDiagonal , B2:: BlockDiagonal ) = B + (- B2)
6971
7072# # Multiplication
7173Base.:* (n:: Number , B:: BlockDiagonal ) = B * n
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ using Test
7676
7777 @test - b1 == - Matrix (b1)
7878 @test b1 - b1 == Matrix (b1) - Matrix (b1)
79+ @test Matrix (b1) - b2 == Matrix (b1) - Matrix (b2)
80+ @test b1 - Matrix (b2) == Matrix (b1) - Matrix (b2)
7981 end
8082
8183 @testset " Multiplication" begin
You can’t perform that action at this time.
0 commit comments