Skip to content

Commit 579f116

Browse files
authored
Resolve ambiguity with UpperTriangular * Diagonal{<:Any,<:LayoutVector} (#129)
* Resolve ambiguity with UpperTriangular * Diagonal{<:Any,<:LayoutVector} * Update ArrayLayouts.jl
1 parent c64e52f commit 579f116

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
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 = "1.0"
4+
version = "1.0.1"
55

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

src/ArrayLayouts.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ getindex(A::AdjOrTrans{<:Any,<:LayoutVector}, kr::Integer, jr::AbstractVector) =
192192
*(A::AbstractMatrix, B::Diagonal{<:Any,<:LayoutVector}) = mul(A, B)
193193
*(A::Diagonal{<:Any,<:LayoutVector}, B::LayoutMatrix) = mul(A, B)
194194
*(A::LayoutMatrix, B::Diagonal{<:Any,<:LayoutVector}) = mul(A, B)
195+
*(A::UpperTriangular, B::Diagonal{<:Any,<:LayoutVector}) = mul(A, B)
196+
*(A::Diagonal{<:Any,<:LayoutVector}, B::UpperTriangular) = mul(A, B)
195197
*(A::Diagonal{<:Any,<:LayoutVector}, B::Diagonal) = mul(A, B)
196198
*(A::Diagonal, B::Diagonal{<:Any,<:LayoutVector}) = mul(A, B)
197199

test/test_layoutarray.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ MemoryLayout(::Type{MyVector}) = DenseColumnMajor()
323323
@test D * A' D * A.A'
324324
@test A' * D A.A' * D
325325

326+
@test T * D T .* D.diag'
327+
@test D * T D.diag .* T
326328
@test A * Adjoint(T) A.A * Adjoint(T)
327329
@test A * Transpose(T) A.A * Transpose(T)
328330
@test Adjoint(T) * A Adjoint(T) * A.A

0 commit comments

Comments
 (0)