#NEWLINE# def __init__( self , p , verbose = False ) : #NEWLINE# #INDENT# '\n        Initialize the sampler.\n\n        Args:\n            p (a list of np.array): list (length n) of numbers \n                that represent the weights over an n-outcome distribution.\n            verbose (bool): self explanatory\n        ' #NEWLINE# n = len ( p ) #NEWLINE# p = ( p . astype ( float ) / sum ( p ) ) #NEWLINE# self . _cdf = np . cumsum ( p )