-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update aliastable.jl #1074
Update aliastable.jl #1074
Conversation
enable `rand()` from non-Float64 mixtures, e.g. `MixtureModel{Univariate,Continuous,Normal,Float32}`, now only `Float64` element type is supported. a related [pull request](JuliaStats/StatsBase.jl#559) is made in `StatsBase. make_alias_table!()`.
Codecov Report
@@ Coverage Diff @@
## master #1074 +/- ##
=======================================
Coverage 80.62% 80.62%
=======================================
Files 113 113
Lines 5611 5611
=======================================
Hits 4524 4524
Misses 1087 1087
Continue to review full report at Codecov.
|
Thanks for the PR! Two points: |
no response from
I tried, but failed. Because I could not modify |
ping! is there anything holding back this PR? (other than perhaps the corresponding PR in StatsBase, |
IIRC we have to wait for the StatsBase PR. |
This also needs tests. |
With StatsBase 0.33.12, sampling from mixture models with component weights of type julia> using Distributions
julia> rand(MixtureModel([Normal(), Normal()], [0.5f0, 0.5f0]), 100)
100-element Vector{Float64}:
... I'll close this PR since the issue that it tries to solve seems to be fixed by the change in StatsBase. |
enable
rand()
from non-Float64 mixtures, e.g.MixtureModel{Univariate,Continuous,Normal,Float32}
, now onlyFloat64
element type is supported.a related pull request is made in
StatsBase.make_alias_table!()
.