Our sampler doesn't support sparse indices
julia> using DynamicDiscreteSamplers
julia> ds = DynamicDiscreteSampler();
julia> push!(ds, 10^10, 1.0)
ERROR: OutOfMemoryError()
Stacktrace:
[1] GenericMemory
@ ./boot.jl:516 [inlined]
[2] array_new_memory
@ ./array.jl:1058 [inlined]
[3] (::Base.var"#133#134"{Vector{Tuple{…}}, Int64, Int64, Int64, Int64, Int64, Memory{Tuple{…}}, MemoryRef{Tuple{…}}})()
@ Base ./array.jl:1129
[4] _growend!
@ ./array.jl:1116 [inlined]
[5] resize!
@ ./array.jl:1450 [inlined]
[6] push!(ns::DynamicDiscreteSamplers.NestedSampler5{64}, i::Int64, x::Float64)
@ DynamicDiscreteSamplers ~/.julia/dev/DynamicDiscreteSamplers/src/DynamicDiscreteSamplers.jl:407
[7] top-level scope
@ REPL[3]:1
Some type information was truncated. Use `show(err)` to see complete types.
I propose to add it with a keyword, like DynamicDiscreteSampler(; sparse=false/true) because supporting it by default would cause overhead
Our sampler doesn't support sparse indices
I propose to add it with a keyword, like
DynamicDiscreteSampler(; sparse=false/true)because supporting it by default would cause overhead