r sample 28 29 funciton in python

Solutions on MaxInterview for r sample 28 29 funciton in python by the best coders in the world

showing results for - "r sample 28 29 funciton in python"
Ariana
25 Feb 2017
1
2import numpy as np
3np.random.choice(values, size=1000,  replace=True, p=probability)
4
5# values is the input values that correspond to the weights
6# size is the number of samples to generate
7# Replace specifies if it's with or without replacement
8# p is the probability of choosing each corresponding value in values
9