Skip to content

Quadratic/Cubic Interpolations Not Working for Dimensions > 3 #151

@nhipsman

Description

@nhipsman

The following works as expected:

using Interpolations
V = zeros(10,10,10)
interpV = interpolate(V, BSpline(Cubic(Line())), OnGrid())

However, the following throws an error:

using Interpolations
V = zeros(10,10,10,10)
interpV = interpolate(V, BSpline(Cubic(Line())), OnGrid())

Specifically:

ERROR: MethodError: no method matching Array{Float64,4}(::Int64, ::Int64, ::Int64, ::Int64)
Closest candidates are:
  Array{Float64,4}{T}(::Any) at sysimg.jl:53
 in alloc_matmul(::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,4}, ::Int64) at /Users/nhipsman/.julia/v0.5/AxisAlgorithms/src/AxisAlgorithms.jl:42
 in _A_ldiv_B_md!(::Array{Float64,4}, ::WoodburyMatrices.Woodbury{Float64,Base.LinAlg.LU{Float64,Tridiagonal{Float64}},SparseMatrixCSC{Float64,Int64},SparseMatrixCSC{Float64,Int64},Array{Float64,2},Array{Float64,2}}, ::Array{Float64,4}, ::CartesianRange{CartesianIndex{0}}, ::CartesianRange{CartesianIndex{3}}, ::Array{Float64,1}) at /Users/nhipsman/.julia/v0.5/Interpolations/src/b-splines/../filter1d.jl:77
 in A_ldiv_B_md!(::Array{Float64,4}, ::WoodburyMatrices.Woodbury{Float64,Base.LinAlg.LU{Float64,Tridiagonal{Float64}},SparseMatrixCSC{Float64,Int64},SparseMatrixCSC{Float64,Int64},Array{Float64,2},Array{Float64,2}}, ::Array{Float64,4}, ::Int64, ::Array{Float64,1}) at /Users/nhipsman/.julia/v0.5/Interpolations/src/b-splines/../filter1d.jl:15
 in prefilter!(::Type{Float64}, ::Array{Float64,4}, ::Type{Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line}}}, ::Type{Interpolations.OnGrid}) at /Users/nhipsman/.julia/v0.5/Interpolations/src/b-splines/prefiltering.jl:58
 in prefilter(::Type{Float64}, ::Type{Float64}, ::Array{Float64,4}, ::Type{Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line}}}, ::Type{Interpolations.OnGrid}) at /Users/nhipsman/.julia/v0.5/Interpolations/src/b-splines/prefiltering.jl:40
 in interpolate(::Type{Float64}, ::Type{Float64}, ::Array{Float64,4}, ::Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line}}, ::Interpolations.OnGrid) at /Users/nhipsman/.julia/v0.5/Interpolations/src/b-splines/b-splines.jl:64
 in interpolate(::Array{Float64,4}, ::Interpolations.BSpline{Interpolations.Cubic{Interpolations.Line}}, ::Interpolations.OnGrid) at /Users/nhipsman/.julia/v0.5/Interpolations/src/b-splines/b-splines.jl:68

Unfortunately I'm not quite an experienced enough Julia programmer to get into the weeds of the source code, but hopefully someone here can. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions