I have a numpy array like this:
arr = [.2 , .1, .2, .3, .2 ]
Now what I want to do is sample from this array, such that the probability i get a certain index is dependent on the probability at the index. So for example, the probability i get index 3 is .3
Anyone know any nifty ways to do this?
pargument innumpy.random.choice