Weighted choice using the cumsum() function from numpy [1]