You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, trying to use weighted sampling without replacement, I found a bug. One can crash the REPL, when trying to sample more points than contained in the weights or a vectors
using StatsBase
a = Vector(1:10)
x = Vector(1:100)
wv = ProbabilityWeights(rand(10))
StatsBase.efraimidis_a_wsample_norep!(a, wv, x)
The other function StatsBase.efraimidis_ares_wsample_norep! for the "Efraimidis-Spirakis A-Res algorithm" catches this and fails more gracefully. (What is the difference between these anyway?)
The text was updated successfully, but these errors were encountered:
Hi, trying to use weighted sampling without replacement, I found a bug. One can crash the REPL, when trying to sample more points than contained in the
weights
ora
vectorsThe other function
StatsBase.efraimidis_ares_wsample_norep!
for the "Efraimidis-Spirakis A-Res algorithm" catches this and fails more gracefully. (What is the difference between these anyway?)The text was updated successfully, but these errors were encountered: