Skip to content

Commit d77a707

Browse files
authored
Fix ambiguity in BandedLazy * Mul (#376)
* Fix ambiguity in BandedLazy * Mul * Update bandedtests.jl
1 parent 8547ddb commit d77a707

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ext/LazyArraysBandedMatricesExt.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ copy(M::Mul{<:AbstractInvLayout, <:BandedLazyLayouts}) = simplify(M)
594594

595595
copy(L::Ldiv{<:BandedLazyLayouts}) = lazymaterialize(\, L.A, L.B)
596596
copy(L::Ldiv{<:BandedLazyLayouts,<:AbstractLazyLayout}) = lazymaterialize(\, L.A, L.B)
597+
copy(L::Ldiv{<:BandedLazyLayouts, ApplyLayout{typeof(*)}}) = copy(Ldiv{UnknownLayout,ApplyLayout{typeof(*)}}(L.A, L.B))
597598
copy(L::Ldiv{<:BandedLazyLayouts, Blay}) where Blay<:Union{AbstractStridedLayout,PaddedColumns} = copy(Ldiv{UnknownLayout,Blay}(L.A, L.B))
598599

599600
## The following needs more thought but for now it fixes a bug downstream.

test/bandedtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,9 @@ LinearAlgebra.lmul!(β::Number, A::PseudoBandedMatrix) = (lmul!(β, A.data); A)
861861

862862
@test A \ A I
863863
@test A \ A isa ApplyArray
864+
865+
M = ApplyArray(*, randn(n,n), b)
866+
@test A \ M Matrix(A) \ M
864867
end
865868

866869
@testset "copyto! broadcast view" begin

0 commit comments

Comments
 (0)