Skip to content

Commit

Permalink
More refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Oct 15, 2024
1 parent 63ad09a commit 9b1107e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/empirical/variogram.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ Optionally, forward `parameters` for the underlying [`EmpiricalVariogram`](@ref)
(https://www.sciencedirect.com/science/article/pii/S0098300419302936)
"""
function EmpiricalVariogram(partition::Partition, var₁, var₂=var₁; kwargs...)
# retain geospatial data with at least 2 points
# retain geospatial data with at least two elements
filtered = Iterators.filter(d -> nelements(domain(d)) > 1, partition)

@assert !isempty(filtered) "invalid partition of geospatial data"

γ(d) = EmpiricalVariogram(d, var₁, var₂; kwargs...)
tmapreduce(γ, merge, collect(filtered))
end
Expand Down

0 comments on commit 9b1107e

Please sign in to comment.