Skip to content

Commit edf1de3

Browse files
authored
Overload _getindex instead of getindex for orthogonal polynomials (#251)
* Overload `_getindex` instead of `getindex` for orthogonal polynomials * Update clenshaw.jl * Update clenshaw.jl * v0.15.9
1 parent 9fff7da commit edf1de3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ClassicalOrthogonalPolynomials"
22
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
3-
version = "0.15.8"
3+
version = "0.15.9"
44
authors = ["Sheehan Olver <[email protected]>"]
55

66
[deps]

src/clenshaw.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ function copyto!(dest::AbstractVector, V::SubArray{<:Any,1,<:OrthogonalPolynomia
5151
dest
5252
end
5353

54-
getindex(P::OrthogonalPolynomial, x::Number, n::AbstractVector) = layout_getindex(P, x, n)
55-
getindex(P::OrthogonalPolynomial, x::AbstractVector, n::AbstractVector) = layout_getindex(P, x, n)
56-
getindex(P::SubArray{<:Any,1,<:OrthogonalPolynomial}, x::AbstractVector) = layout_getindex(P, x)
57-
Base.@propagate_inbounds function getindex(P::OrthogonalPolynomial, x::Number, n::Number)
54+
Base.@propagate_inbounds function _getindex(::Type{IND}, P::OrthogonalPolynomial, (x,n)::IND) where IND
5855
@boundscheck checkbounds(P, x, n)
5956
Base.unsafe_getindex(P, x, n)
6057
end

0 commit comments

Comments
 (0)