sortbased_rand¶
- sortbased_rand(n_range: int, iterations: int, n_picks: int = -1)[source][source]¶
Generate random numbers using sort-based sampling, resulting in a random choice generation without replacement along the first axis.
- Parameters:
- Returns:
An array of shape (iterations, n_picks) containing the random numbers.
- Return type:
array
References
Examples
>>> np.random.seed(0) >>> sortbased_rand(10, 5, 3) array([[9, 4, 6], [6, 4, 5], [4, 6, 9], [4, 0, 2], [3, 7, 6]])