Skip to content
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

fix legacy usage of RangeGenerator #576

Merged
merged 1 commit into from
May 20, 2020

Conversation

rfourquet
Copy link
Contributor

RangeGenerator is a pre-Julia-1.0 thing, and was maintained in Random only to reduce breakage of packages. But the (not so) new way of doing things is now Sampler(rng, 1:n). This is supposed to select the best sampler type depending on rng.
Fixes JuliaRandom/StableRNGs.jl#3.

@rfourquet
Copy link
Contributor Author

This fails on Julia-nightly tests, but this is not related to this PR AFAICT (I get a similar failure locally on Julia-nightly with StatsBase@v0.33.0).

Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know better than I do whether that's the right approach.

@rfourquet
Copy link
Contributor Author

Good to go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent results for StatsBase wsample
2 participants