We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking at some examples at https://juliamath.github.io/Interpolations.jl/stable/control/ i see
a = rand(10) # test data # Nearest-neighbor interpolation itp = interpolate(a, BSpline(Constant())) v = itp(5.4) # returns a[5] # Previous-neighbor interpolation itp = interpolate(a, BSpline(Constant(Previous))) # this fails
because
julia> Constant(Previous) ERROR: MethodError: no method matching (Constant{Nearest})(::Type{Previous}) Closest candidates are: (Constant{T})() where T<:Interpolations.ConstantInterpType at ~/.julia/packages/Interpolations/Sxe87/src/b-splines/constant.jl:41 (Constant{T})(::Periodic{Nothing}) where T<:Interpolations.ConstantInterpType at ~/.julia/packages/Interpolations/Sxe87/src/b-splines/constant.jl:43 (Constant{T})(::BC) where {T<:Interpolations.ConstantInterpType, BC<:Interpolations.BoundaryCondition} at ~/.julia/packages/Interpolations/Sxe87/src/b-splines/constant.jl:42 Stacktrace: [1] Constant(args::Type) @ Interpolations ~/.julia/packages/Interpolations/Sxe87/src/b-splines/constant.jl:40 [2] top-level scope @ REPL[16]:1
As far as I can tell, you are supposed to do
itp = interpolate(a, BSpline(Constant{Previous}()))
Tested on julia 1.8.0 and 1.7.3 with Interpolations v0.14.6
So i think just the documentation is wrong here?
Interpolations.jl/docs/src/control.md
Line 18 in 33409a6
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Looking at some examples at https://juliamath.github.io/Interpolations.jl/stable/control/
i see
because
As far as I can tell, you are supposed to do
Tested on julia 1.8.0 and 1.7.3 with Interpolations v0.14.6
So i think just the documentation is wrong here?
Interpolations.jl/docs/src/control.md
Line 18 in 33409a6
The text was updated successfully, but these errors were encountered: