diff --git a/Project.toml b/Project.toml index 858c218a..0092beaa 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "LazyArrays" uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "2.1.3" +version = "2.1.4" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" @@ -27,7 +27,7 @@ LazyArraysStaticArraysExt = "StaticArrays" [compat] Aqua = "0.8" -ArrayLayouts = "1.10" +ArrayLayouts = "1.10.1" BandedMatrices = "1.6.2" Base64 = "1" BlockArrays = "1.0" diff --git a/ext/LazyArraysBandedMatricesExt.jl b/ext/LazyArraysBandedMatricesExt.jl index b6a5f660..796c2f62 100644 --- a/ext/LazyArraysBandedMatricesExt.jl +++ b/ext/LazyArraysBandedMatricesExt.jl @@ -547,6 +547,7 @@ const BandedLazyLayouts = Union{AbstractLazyBandedLayout, BandedColumns{LazyLayo copy(M::Mul{<:BandedLazyLayouts, <:BandedLazyLayouts}) = simplify(M) copy(M::Mul{<:BandedLazyLayouts}) = simplify(M) copy(M::Mul{<:BandedLazyLayouts, <:LazyLayouts}) = simplify(M) +copy(M::Mul{<:LazyLayouts, <:BandedLazyLayouts}) = simplify(M) copy(M::Mul{<:Any, <:BandedLazyLayouts}) = simplify(M) copy(M::Mul{<:BandedLazyLayouts, <:AbstractLazyLayout}) = simplify(M) copy(M::Mul{<:AbstractLazyLayout, <:BandedLazyLayouts}) = simplify(M) diff --git a/test/multests.jl b/test/multests.jl index d751e389..cddfc3fa 100644 --- a/test/multests.jl +++ b/test/multests.jl @@ -1,4 +1,4 @@ -using Test, LinearAlgebra, LazyArrays, StaticArrays, FillArrays, Base64, Random +using Test, LinearAlgebra, LazyArrays, StaticArrays, FillArrays, Base64, Random, BandedMatrices import LazyArrays: MulAdd, MemoryLayout, DenseColumnMajor, DiagonalLayout, SymTridiagonalLayout, Add, AddArray, MulStyle, MulAddStyle, Applied, ApplyStyle, Lmul, ApplyArrayBroadcastStyle, DefaultArrayApplyStyle, Rmul, ApplyLayout, arguments, colsupport, rowsupport, lazymaterialize @@ -1180,3 +1180,10 @@ end @test LazyArrays.simplify(Applied(*, A, A)) == A*A end end + +@testset "Issue #330" begin + A = UpperTriangular(ApplyArray(inv, rand(5, 5))) + v1, v2 = ApplyVector(+, rand(5), rand(5)), ApplyVector(+, rand(4), rand(4)) + B = Tridiagonal(v2, v1, v2) + @test copy(Mul(A, B)) ≈ Matrix(A) * Matrix(B) +end