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 #4

Merged
merged 4 commits into from
Jun 8, 2015
Merged

Sample #4

merged 4 commits into from
Jun 8, 2015

Conversation

saromanov
Copy link
Contributor

Hi!
I just added getting samples from slice and it looks so:

import (
"stats"
)

func main(){
//getting samples from slice without replacement
stats.Sample([]float64{0.1,0.2,0.3,0.4}, 3, false) // [0.2,0.1,0.4]

//or getting samples with replacement
stats.Sample([]float64{0.1,0.2,0.3,0.4}, 30, true) // [0.2,0.2,0.4,0.3]...
}

What do you think(if someone alive here:)

montanaflynn pushed a commit that referenced this pull request Jun 8, 2015
@montanaflynn montanaflynn merged commit 865cbdd into montanaflynn:master Jun 8, 2015
@montanaflynn
Copy link
Owner

Looks great, thanks for the contribution!

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.

None yet

2 participants