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! I think the documentation of sample is a bit misleading. I'm referring to this page.
There, we have as a third variant of the function
sample([rng], a, [wv::AbstractWeights], dims::Dims; replace=true, ordered=false)
However, if I understand the source code correctly, there is no implementation of sample with weights, which supports the keyword flags. But I might be mistaken - in this case I appreciate correction.
Functions efraimidis_a_wsample_norep and efraimidis_ares_wsample_norep should should serve for the no-replacement version, right?
Thanks already!
The text was updated successfully, but these errors were encountered:
Functions efraimidis_a_wsample_norep and efraimidis_ares_wsample_norep should should serve for the no-replacement version, right?
I'm surprised those functions are included in the manual as I didn't think they were intended to be user-facing; they aren't exported and the names are quite obscure. Efraimidis-Spirakis is used internally for weighted sampling without replacement but AFAIK that's an implementation detail.
Yes, sorry for the invalid report! Your code works (replacement=false was, what I needed, but it works as well). I can't reproduce my non-working example, but probably I misinterpreted the error message, which said that no method ... exists, and overlooked the method definition in sampling.jl
Thank you for looking that up!!
Hi! I think the documentation of
sample
is a bit misleading. I'm referring to this page.There, we have as a third variant of the function
sample([rng], a, [wv::AbstractWeights], dims::Dims; replace=true, ordered=false)
However, if I understand the source code correctly, there is no implementation of
sample
with weights, which supports the keyword flags. But I might be mistaken - in this case I appreciate correction.Functions
efraimidis_a_wsample_norep
andefraimidis_ares_wsample_norep
should should serve for the no-replacement version, right?Thanks already!
The text was updated successfully, but these errors were encountered: