Skip to content

Commit

Permalink
Use .+ and .- for elementwise addition/subtraction
Browse files Browse the repository at this point in the history
Fixes deprecation due to JuliaLang/julia#22932.
  • Loading branch information
martinholters committed Sep 14, 2017
1 parent ea29dfc commit 17818b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kdtree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function KDTree(p::AbstractMatrix, Np=size(p,2))
end
dim = indmax(vec(var(p[:,p_idx[min_idx[n]:max_idx[n]]],2)))
idx = sortperm(vec(p[dim,p_idx[min_idx[n]:max_idx[n]]]))
p_idx[min_idx[n]:max_idx[n]] = p_idx[idx + min_idx[n] - 1]
p_idx[min_idx[n]:max_idx[n]] = p_idx[idx .+ min_idx[n] .- 1]
cut_idx[n] = calc_cut_idx(min_idx[n], max_idx[n])
cut_dim[n] = dim
cut_val[n] = mean(p[dim, p_idx[cut_idx[n]:cut_idx[n]+1]])
Expand Down

0 comments on commit 17818b4

Please sign in to comment.