choice_log¶
- choice_log(n_choice: int, n_sample: int, random_generator: Generator) ndarray[source]¶
Random choice function with log probability rather than uniform.
To seed the function the np.random.seed must be set in a numba function prior to calling this i.e. using set_numba_random_seed.
- Parameters:
- n_choiceint
The number of possible choice. Choices will be made in an array from 0 to n_choice-1.
- n_sampleint
Number of choice to sample.
- random_generatorrandom_generator
- Returns:
- array
The randomly chosen samples.