JuliaMath / JuliaMath/Dierckx.jl
Periodic ParametricSpline() does not accept an 's' argument
- Dominant language
- Julia
- Stars
- 173
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
When trying to fit a periodic ParametricSpline() the function does not accept an s argument
Slightly modified example form the runtest.jl:
x = [23. 24. 25. 25. 24. 23.;
13. 12. 12. 13. 13. 13.]
spl = ParametricSpline(x, periodic=true,s=1)
Error message:
ERROR: KeyError: key 1 not found
Stacktrace:
[1] getindex at ./dict.jl:478 [inlined]
[2] _ParametricSpline(::Nothing, ::Array{Float64,2}, ::Nothing, ::Array{Float64,1}, ::Int64, ::Int64, ::String, ::Bool) at /home/user/.julia/packages/Dierckx/9SY4A/src/Dierckx.jl:573
[3] #ParametricSpline#5 at /home/user/.julia/packages/Dierckx/9SY4A/src/Dierckx.jl:433 [inlined]
[4] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:periodic, :s),Tuple{Bool,Int64}}, ::Type{ParametricSpline}, ::Array{Float64,2}) at ./none:0
[5] top-level scope at none:0
Without s=1 or with s=0 everything works fine
Thanks for your help
Alex
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the periodic ParametricSpline example from the issue and inspect the ParametricSpline implementation in Dierckx.jl around line 573, along with the related example in runtest.jl. The issue is done when a periodic spline accepts a positive s argument without the KeyError while preserving the existing behavior for s=0 or no s argument.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100