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

Sample should be without replacement #1

Open
robbat2 opened this issue Mar 29, 2015 · 1 comment
Open

Sample should be without replacement #1

robbat2 opened this issue Mar 29, 2015 · 1 comment

Comments

@robbat2
Copy link

robbat2 commented Mar 29, 2015

The definition of sample is that it should be WITHOUT replacement.
From the Rubydocs on Array#sample:
The elements are chosen by using random and unique indices into the array in order to ensure that an element doesn’t repeat itself unless the array already contained duplicate elements.

@jaysonvirissimo
Copy link

jaysonvirissimo commented Oct 26, 2018

@robbat2 I just made an alternative to weighted_randomizer partly to correct this issue.

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

No branches or pull requests

2 participants