You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jstac What is your use case where you need a jitted version of this functionality? What's wrong with generating random numbers outside your jit function and then using np.searchsorted (or qe.searchsorted) inside the jit function?
@oyamad I need to draw one variate from a fixed discrete distribution until a stopping condition is satisfied, in a loop. It needs to be fast. I don't know the size of the sequence ex ante.
Activity
jstac commentedon Mar 8, 2018
@oyamad I need to draw one variate from a fixed discrete distribution until a stopping condition is satisfied, in a loop. It needs to be fast. I don't know the size of the sequence ex ante.
oyamad commentedon Mar 8, 2018
@jstac I see.
Would it be possible to set a seed in your own function, removing
np.random.seedfromquantecon?jstac commentedon Mar 8, 2018
@oyamad Yes, that's certainly possible.
Regarding the numba version, thanks for picking that up. Version 0.36.2 has many problems.
So, the proposal is
Nonewith0as the default argument forcum_sumoyamad commentedon Mar 9, 2018
@jstac Here's my proposal:
Works with both Numba 0.36.2 and 0.37.0.
jstac commentedon Mar 10, 2018
@oyamad This is beautiful. Thank you. I learned a lot from reading the code.
I fully support this. Would you mind to make a PR?