Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

InterpLinear with more than 4 dimensions #22

Closed
mykelk opened this issue May 22, 2014 · 3 comments
Closed

InterpLinear with more than 4 dimensions #22

mykelk opened this issue May 22, 2014 · 3 comments

Comments

@mykelk
Copy link

mykelk commented May 22, 2014

Linear interpolation works fine with 1-4 dimensions, but it breaks at 5.

julia> B=rand(4,4,4,4,4);

julia> Bi=InterpGrid(B,BCnil, InterpLinear);

julia> Bi[2,2,2,2,2]
ERROR: no method interp_coef_generic(Array{Float64,1}, Array{Array{Float64,1},1})
 in interp_coef at /home/mykel/.julia/v0.3/Grid/src/interp.jl:1125
 in set_position at /home/mykel/.julia/v0.3/Grid/src/interp.jl:412
 in getindex at /home/mykel/.julia/v0.3/Grid/src/interp.jl:149
@tomasaschan
Copy link
Collaborator

Thanks.

The problem seems to be that interp_coef_generic has two overloads, but one of them is defined with one argument several arguments too much. This doesn't show up in dimensions lower than 5, because interp_coef is specialized on lower dimensions and doesn't call the generic one at all.

I'll push a fix in a moment.

@tomasaschan
Copy link
Collaborator

There - this should fix it.

@mykelk, I didn't tag a new version for this, so if you're not running the latest master already you can checkout these changes by running Pkg.checkout("Grid") from the Julia REPL.

@timholy
Copy link
Owner

timholy commented May 23, 2014

Thanks, @tlycken!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants