Skip to content

Commit b08b5aa

Browse files
authored
fix jacobi evaluation (#90)
1 parent 987df98 commit b08b5aa

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunOrthogonalPolynomials"
22
uuid = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
3-
version = "0.4.15"
3+
version = "0.4.16"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Spaces/Jacobi/JacobiOperators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ end
9090

9191
function getindex(op::ConcreteEvaluation{<:Jacobi,<:Number},kr::AbstractRange)
9292
@assert op.order == 0
93-
jacobip(eltype(op),kr-1,op.space.a,op.space.b,tocanonical(domain(op),op.x))
93+
jacobip(eltype(op),kr.-1,op.space.a,op.space.b,tocanonical(domain(op),op.x))
9494
end
9595

9696

test/JacobiTest.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ import ApproxFunOrthogonalPolynomials: jacobip
2828
@test norm((Fun(f,sp2)-f2).coefficients)<100eps()
2929
@test norm((Fun(f,sp3)-f3).coefficients)<100eps()
3030
@test norm((Fun(f,sp4)-f4).coefficients)<200eps()
31+
32+
f = Fun(Jacobi(0,0), Float64[1,2,3])
33+
for x in [-1, 0, 1]
34+
g = Evaluation(x) * f
35+
@test ncoefficients(g) == 1
36+
@test coefficients(g)[1] == f(x)
37+
end
3138
end
3239

3340
@testset "Conversion" begin

0 commit comments

Comments
 (0)