diff --git a/Project.toml b/Project.toml index 327e93a..005a8fa 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ContinuumArrays" uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c" -version = "0.8.4" +version = "0.8.5" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" diff --git a/src/bases/bases.jl b/src/bases/bases.jl index 31b1c7d..7fcc6db 100644 --- a/src/bases/bases.jl +++ b/src/bases/bases.jl @@ -59,8 +59,10 @@ end @inline copy(L::Ldiv{<:AbstractBasisLayout,BroadcastLayout{typeof(+)}}) = +(broadcast(\,Ref(L.A),arguments(L.B))...) @inline copy(L::Ldiv{<:AbstractBasisLayout,BroadcastLayout{typeof(+)},<:Any,<:AbstractQuasiVector}) = transform_ldiv(L.A, L.B) -@inline copy(L::Ldiv{Lay,BroadcastLayout{typeof(+)},<:Any,<:AbstractQuasiVector}) where Lay<:MappedBasisLayouts = +for op in (:+, :-) + @eval @inline copy(L::Ldiv{Lay,BroadcastLayout{typeof($op)},<:Any,<:AbstractQuasiVector}) where Lay<:MappedBasisLayouts = copy(Ldiv{Lay,LazyLayout}(L.A,L.B)) +end @inline function copy(L::Ldiv{<:AbstractBasisLayout,BroadcastLayout{typeof(-)}}) a,b = arguments(L.B) diff --git a/test/runtests.jl b/test/runtests.jl index ddbe662..6861309 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -450,6 +450,7 @@ end @testset "Mapped and BroadcastLayout{typeof(+)}" begin @test L[y,:] \ (y .+ y) ≈ L[y,:] \ (2y) + @test L[y,:] \ (y .- y) ≈ zeros(10) end end