diff --git a/Project.toml b/Project.toml index 2b79d81..319e5da 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Kriging" uuid = "6133562b-a8e8-5ea3-954b-37642b766dad" -version = "0.6.1" +version = "0.6.2" [deps] DocumentFunction = "e1f3b4f0-2dc4-57d3-83f7-d4b7faf3b05b" diff --git a/src/Kriging.jl b/src/Kriging.jl index 9e85100..9a549ee 100644 --- a/src/Kriging.jl +++ b/src/Kriging.jl @@ -137,7 +137,7 @@ function inversedistance(x0mat::AbstractMatrix, X::AbstractMatrix, Z::AbstractVe weights = Array{Float64}(undef, size(X, 2)) for i = 1:size(x0mat, 2) for j = 1:size(X, 2) - weights[j] = 1. / distance(x0mat[:, i], X[:, j]) ^ pow + weights[j] = inv.(distance(x0mat[:, i], X[:, j]) ^ pow) end result[i] = LinearAlgebra.dot(weights, Z) / sum(weights) end