From 485dd5c040b1d28b0cf43af3deb67f07ed15761b Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 21 Oct 2025 14:47:30 +0100 Subject: [PATCH 1/4] Overload `_getindex` instead of `getindex` for orthogonal polynomials --- src/clenshaw.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clenshaw.jl b/src/clenshaw.jl index b08a4256..3903ed72 100644 --- a/src/clenshaw.jl +++ b/src/clenshaw.jl @@ -51,10 +51,10 @@ function copyto!(dest::AbstractVector, V::SubArray{<:Any,1,<:OrthogonalPolynomia dest end -getindex(P::OrthogonalPolynomial, x::Number, n::AbstractVector) = layout_getindex(P, x, n) -getindex(P::OrthogonalPolynomial, x::AbstractVector, n::AbstractVector) = layout_getindex(P, x, n) -getindex(P::SubArray{<:Any,1,<:OrthogonalPolynomial}, x::AbstractVector) = layout_getindex(P, x) -Base.@propagate_inbounds function getindex(P::OrthogonalPolynomial, x::Number, n::Number) +_getindex(::Type{Tuple{IND1,IND2}}, P::OrthogonalPolynomial, (x,n)::Tuple{IND1,AbstractVector{IND2}}) where {IND1,IND2} = layout_getindex(P, x, n) +_getindex(::Type{Tuple{IND1,IND2}}, P::OrthogonalPolynomial, (x,n)::Tuple{AbstractVector{IND1},AbstractVector{IND2}}) where {IND1,IND2} = layout_getindex(P, x, n) +_getindex(::Type{Tuple{IND1}}, P::SubArray{<:Any,1,<:OrthogonalPolynomial}, x::AbstractVector{IND1}) where {IND1} = layout_getindex(P, x) +Base.@propagate_inbounds function _getindex(::Type{IND}, P::OrthogonalPolynomial, (x,n)::IND) where IND @boundscheck checkbounds(P, x, n) Base.unsafe_getindex(P, x, n) end From ccbe9aaaa0f6f801e7d4772bf224823572c92396 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 21 Oct 2025 16:43:56 +0100 Subject: [PATCH 2/4] Update clenshaw.jl --- src/clenshaw.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/clenshaw.jl b/src/clenshaw.jl index 3903ed72..c36df997 100644 --- a/src/clenshaw.jl +++ b/src/clenshaw.jl @@ -52,8 +52,6 @@ function copyto!(dest::AbstractVector, V::SubArray{<:Any,1,<:OrthogonalPolynomia end _getindex(::Type{Tuple{IND1,IND2}}, P::OrthogonalPolynomial, (x,n)::Tuple{IND1,AbstractVector{IND2}}) where {IND1,IND2} = layout_getindex(P, x, n) -_getindex(::Type{Tuple{IND1,IND2}}, P::OrthogonalPolynomial, (x,n)::Tuple{AbstractVector{IND1},AbstractVector{IND2}}) where {IND1,IND2} = layout_getindex(P, x, n) -_getindex(::Type{Tuple{IND1}}, P::SubArray{<:Any,1,<:OrthogonalPolynomial}, x::AbstractVector{IND1}) where {IND1} = layout_getindex(P, x) Base.@propagate_inbounds function _getindex(::Type{IND}, P::OrthogonalPolynomial, (x,n)::IND) where IND @boundscheck checkbounds(P, x, n) Base.unsafe_getindex(P, x, n) From 3c23f1f1a4daceac630dea9896b3f60a2848163d Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 21 Oct 2025 16:45:01 +0100 Subject: [PATCH 3/4] Update clenshaw.jl --- src/clenshaw.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/clenshaw.jl b/src/clenshaw.jl index c36df997..24647e9a 100644 --- a/src/clenshaw.jl +++ b/src/clenshaw.jl @@ -51,7 +51,6 @@ function copyto!(dest::AbstractVector, V::SubArray{<:Any,1,<:OrthogonalPolynomia dest end -_getindex(::Type{Tuple{IND1,IND2}}, P::OrthogonalPolynomial, (x,n)::Tuple{IND1,AbstractVector{IND2}}) where {IND1,IND2} = layout_getindex(P, x, n) Base.@propagate_inbounds function _getindex(::Type{IND}, P::OrthogonalPolynomial, (x,n)::IND) where IND @boundscheck checkbounds(P, x, n) Base.unsafe_getindex(P, x, n) From cf995ee0742a067e4c1cda058842c119b19022f9 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 21 Oct 2025 21:01:40 +0100 Subject: [PATCH 4/4] v0.15.9 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index ee276ede..53e3eb86 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ClassicalOrthogonalPolynomials" uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" -version = "0.15.8" +version = "0.15.9" authors = ["Sheehan Olver "] [deps]