JuliaMath / JuliaMath/Interpolations.jl
Periodic{OnGrid} is problematic
- Dominant language
- Julia
- Stars
- 575
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
Report via Slack:
https://julialang.slack.com/archives/C6A044SQH/p1655221621792669
> I am having a problem with the Interpolations.jl package.
Trying to do a periodic cubic spline interpolation results in the following:
```
julia> itp = interpolate([1,2,3,4,1], BSpline(Cubic(Periodic(OnGrid()))));
julia> Interpolations.gradient(itp, 1)
1-element StaticArrays.SVector{1, Float64} with indices SOneTo(1):
1.0909090909090908
julia> Interpolations.gradient(itp, 5)
1-element StaticArrays.SVector{1, Float64} with indices SOneTo(1):
-2.181818181818182
I would have expected itp'(1) = itp'(5) and itp''(1) = itp''(5).
```
>Am I doing something wrong here? (edited)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.