Discover 1 interesting websites in the Programming category.
random.choice(a, size=None, replace=True, p=None) #. Generates a random sample from a given 1-D array. New in version 1.7.0. Note. New code should use the choice method of a Generator instance instead; please see the Quick Start. Parameters: a1-D array-like or int. If an ndarray, a random sample is generated from its elements.