Skip to content

Commit

Permalink
Modify the type of data from DenseArray to AbstractArray in interpola…
Browse files Browse the repository at this point in the history
…te function
  • Loading branch information
himanshugupta1009 committed Jul 12, 2024
1 parent 3149429 commit 2e53d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GridInterpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end


# masked interpolation ignores points that are masked
function maskedInterpolate(grid::AbstractGrid, data::DenseArray, x::AbstractVector, mask::BitArray{1})
function maskedInterpolate(grid::AbstractGrid, data::AbstractArray, x::AbstractVector, mask::BitArray{1})
index, weight = interpolants(grid, x)
val = zero(eltype(data))
totalWeight = zero(eltype(data))
Expand All @@ -139,7 +139,7 @@ function maskedInterpolate(grid::AbstractGrid, data::DenseArray, x::AbstractVect
return val / totalWeight
end

function interpolate(grid::AbstractGrid, data::DenseArray, x::AbstractVector)
function interpolate(grid::AbstractGrid, data::AbstractArray, x::AbstractVector)
index, weight = interpolants(grid, x)
v = zero(eltype(data))
for (i, data_ind) in enumerate(index)
Expand Down

0 comments on commit 2e53d06

Please sign in to comment.