-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
FEAT: Add jitted function for drawing #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some comments:
|
quantecon/discrete_rv.py
Outdated
|
||
|
||
@jit(nopython=True) | ||
def discrete_rv(p_vals, cum_sum=None, size=1000, seed=0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for seed
must be None
.
04b0a72
to
f543a9e
Compare
I agree with those comments. @jstac What do you think? |
dfacbc9
to
b87ed1a
Compare
b87ed1a
to
081163f
Compare
@mmcky I'm going to go ahead and merge this, i hope that's OK. |
Adds a jitted function for drawing discrete random variables. Note that
DiscreteRV.draw
no longer usescheck_random_state
as Numba supports top-level functions from the numpy.random module, but does not allow you to create individual RandomState instances.Close #390