Numba random
A few numbaised useful functions for random sampling.
random_choice_numba(arr, prob)
Fast implementation of np.random.choice
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arr
|
|
required | |
prob
|
|
required |
Source code in june/utils/numba_random.py
9 10 11 12 13 14 15 16 17 18 |
|
random_choice_numba_numpy(arr, prob, random_number)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arr
|
|
required | |
prob
|
|
required | |
random_number
|
|
required |
Source code in june/utils/numba_random.py
23 24 25 26 27 28 29 30 31 32 33 34 |
|