diff --git a/src/empirical/varioplane.jl b/src/empirical/varioplane.jl index 1f25ce1..7e00a84 100644 --- a/src/empirical/varioplane.jl +++ b/src/empirical/varioplane.jl @@ -43,22 +43,22 @@ function EmpiricalVarioplane( planes = [data] u, v = Vec(1.0, 0.0), Vec(0.0, 1.0) elseif Dim == 3 - planes = partition(rng, data, PlanePartition(normal, tol=ptol)) + subset = partition(rng, data, PlanePartition(normal, tol=ptol)) + planes = collect(subset) u, v = householderbasis(normal) else @error "varioplane only supported in 2D or 3D" end # loop over half of the plane - θs = range(0, stop=π, length=nangs) + θs = collect(range(0, stop=π, length=nangs)) γs = map(θs) do θ dir = DirectionPartition(cos(θ) * u + sin(θ) * v, tol=dtol) - γ(plane) = EmpiricalVariogram(partition(rng, plane, dir), var₁, var₂; kwargs...) - tmapreduce(γ, merge, collect(planes)) + tmapreduce(γ, merge, planes) end - EmpiricalVarioplane(collect(θs), γs) + EmpiricalVarioplane(θs, γs) end # -----------