From 44d9d30e077d7dd59a777cd9f9fcef29be13fb53 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Mon, 23 Feb 2026 08:47:50 +0000 Subject: [PATCH 1/2] support sum in generator syntax --- Project.toml | 2 +- src/rect.jl | 3 ++- test/test_rect.jl | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 6c2dfe1..96394de 100644 --- a/Project.toml +++ b/Project.toml @@ -44,7 +44,7 @@ InfiniteArrays = "0.15" InfiniteLinearAlgebra = "0.10" LazyArrays = "2.3.1" LazyBandedMatrices = "0.11.7" -QuasiArrays = "0.13.1" +QuasiArrays = "0.13.3" Random = "1" RecurrenceRelationships = "0.2" SpecialFunctions = "1, 2" diff --git a/src/rect.jl b/src/rect.jl index ec1082a..68c8795 100644 --- a/src/rect.jl +++ b/src/rect.jl @@ -108,10 +108,11 @@ function *(A::TensorPlan, B::AbstractArray) end function checkpoints(P::RectPolynomial) - x,y = checkpoints.(P.args) + x,y = map(checkpoints,P.args) SVector.(x, y') end + function plan_transform(P::KronPolynomial{d,<:Any,<:Fill}, (B,)::Tuple{Block{1}}, dims=1:1) where d @assert only(dims) == 1 diff --git a/test/test_rect.jl b/test/test_rect.jl index a8f9007..ed650f1 100644 --- a/test/test_rect.jl +++ b/test/test_rect.jl @@ -297,4 +297,12 @@ Random.seed!(3242) @test Q[SVector(0.1,0.2),2] ≈ (cos(0.1) - sin(1))/sqrt(2cos(2) + sin(2)) @test Q[SVector(0.1,0.2),3] ≈ (cos(0.2) - sin(1))/sqrt(2cos(2) + sin(2)) end + + @testset "sum/expand on rectangles" begin + @test expand(exp(x*cos(y)) for (x,y) in ChebyshevInterval()^2)[SVector(0.1,0.2)] ≈ exp(0.1*cos(0.2)) + + @test sum(exp(x*cos(y)) for (x,y) in ChebyshevInterval()^2) ≈ 4.504564632388105 + @test sum(exp(x*cos(y)) for (x,y) in (0..1) × (1/3..1/2)) ≈ 0.27240475761608607 + @test sum(exp(x*cos(y)) for (x,y) in Inclusion((0..1) × (0..1))) ≈ sum(exp(x*cos(y)) for x in 0..1, y in 0..1) ≈ 1.5744082630525795 + end end From c838e31e9191d8376707e38500b007797b8f6ed3 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 24 Feb 2026 10:36:38 +0000 Subject: [PATCH 2/2] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 96394de..a218a7a 100644 --- a/Project.toml +++ b/Project.toml @@ -35,7 +35,7 @@ BandedMatrices = "1" BlockArrays = "1.7.3" BlockBandedMatrices = "0.13" ClassicalOrthogonalPolynomials = "0.15.8" -ContinuumArrays = "0.20" +ContinuumArrays = "0.20.4" DomainSets = "0.7" FastTransforms = "0.17" FillArrays = "1.0"