From 35a9342c5277933e6fed6022565fc5ada96b6105 Mon Sep 17 00:00:00 2001 From: Tomas Lycken Date: Fri, 2 Jan 2015 02:16:20 +0100 Subject: [PATCH] Get padding as Int when used for sizing --- src/Interpolations.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Interpolations.jl b/src/Interpolations.jl index 029dd9bc..5987be1d 100644 --- a/src/Interpolations.jl +++ b/src/Interpolations.jl @@ -77,7 +77,7 @@ Interpolation{TIn,N,IT<:InterpolationType,EB<:ExtrapolationBehavior}(A::Abstract # We also ensure that the coefficient array is of the correct type prefilter{T,N,TCoefs,IT<:InterpolationType}(::Type{TCoefs}, A::AbstractArray{T,N}, ::IT) = copy!(Array(TCoefs,size(A)...), A) -size{T,N,TCoefs,IT<:InterpolationType}(itp::Interpolation{T,N,TCoefs,IT}, d::Integer) = size(itp.coefs, d) - 2*padding(TCoefs,IT()) +size{T,N,TCoefs,IT<:InterpolationType}(itp::Interpolation{T,N,TCoefs,IT}, d::Integer) = size(itp.coefs, d) - 2*padding(Int,IT()) size(itp::AbstractInterpolation) = tuple([size(itp,i) for i in 1:ndims(itp)]...) ndims(itp::Interpolation) = ndims(itp.coefs) eltype{T}(itp::Interpolation{T}) = T @@ -113,7 +113,7 @@ function pad_size_and_index(sz::Tuple, pad) sz, ind end function copy_with_padding(TCoefs, A, it::InterpolationType) - pad = padding(it) + pad = padding(Int, it) sz,ind = pad_size_and_index(size(A), pad) coefs = fill!(Array(TCoefs, sz...), 0) coefs[ind...] = A