Closed rafaqz closed 3 years ago
Describe the bug
julia> rand(NearestNeighborCluster(; n=:queen), 100, 100) ERROR: InexactError: Int64(-0.8399155691543502) Stacktrace: [1] Int64(::Float64) at ./float.jl:710 [2] label(::Array{Float64,2}, ::Symbol) at /home/raf/julia/NeutralLandscapes/src/classify.jl:118 [3] _landscape!(::Array{Float64,2}, ::NearestNeighborCluster) at /home/raf/julia/NeutralLandscapes/src/algorithms/nncluster.jl:25 [4] #rand!#3 at /home/raf/julia/NeutralLandscapes/src/landscape.jl:32 [inlined] [5] #rand#1 at /home/raf/julia/NeutralLandscapes/src/landscape.jl:20 [inlined] [6] #rand#2 at /home/raf/julia/NeutralLandscapes/src/landscape.jl:22 [inlined] [7] rand(::NearestNeighborCluster, ::Int64, ::Int64) at /home/raf/julia/NeutralLandscapes/src/landscape.jl:22 [8] top-level scope at REPL[2]:1
Environment:
the :queen option causes it to read out of bounds, ugly but functional solution in #54
:queen
closed in #54
Describe the bug
Environment: