Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin authored Feb 15, 2024
1 parent 8105d72 commit dafd32b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ function alias_sample!(rng::AbstractRNG, a::AbstractArray, wv::AbstractWeights,
# sampling
s = Sampler(rng, 1:n)
for i = 1:length(x)
j = rand(rng, wsum)
j = rand(rng, s)
x[i] = rand(rng) < ap[j] ? a[j] : a[alias[j]]
end
return x
Expand Down

0 comments on commit dafd32b

Please sign in to comment.