Skip to content

Commit ed0eb07

Browse files
authored
Fix rdiv ambiguity (#68)
1 parent 837739e commit ed0eb07

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ArrayLayouts"
22
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.8.12"
4+
version = "0.8.13"
55

66
[deps]
77
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"

src/ldiv.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ macro _layoutldiv(Typ)
173173
ret = quote
174174
$ret
175175
Base.:\(A::$Typ, x::LayoutMatrix) = ArrayLayouts.ldiv(A,x)
176+
Base.:/(x::LayoutMatrix, A::$Typ) = ArrayLayouts.rdiv(x,A)
176177
end
177178
end
178179
esc(ret)

test/test_layoutarray.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using ArrayLayouts, LinearAlgebra, FillArrays, Base64, Test
22
import ArrayLayouts: sub_materialize, MemoryLayout, ColumnNorm, RowMaximum, CRowMaximum
33

4-
54
struct MyMatrix <: LayoutMatrix{Float64}
65
A::Matrix{Float64}
76
end
@@ -179,6 +178,8 @@ MemoryLayout(::Type{MyVector}) = DenseColumnMajor()
179178
@test_broken A/A I
180179
@test A\MyVector(x) A\x
181180
@test A\MyMatrix(X) A\X
181+
182+
@test_broken A/A A.A / A.A
182183
end
183184

184185
@testset "dot" begin
@@ -384,4 +385,7 @@ triangulardata(A::MyUpperTriangular) = triangulardata(A.A)
384385
@test lmul!(U, copy(B)) U * B
385386

386387
@test_skip lmul!(U,view(copy(B),collect(1:5),1:5)) U * B
388+
389+
@test MyMatrix(A) / U A / U
390+
@test_broken U / MyMatrix(A) U / A
387391
end

0 commit comments

Comments
 (0)