Skip to content
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

Test different approaches for exponentially distributed random number generation #15

Open
jmason42 opened this issue Dec 19, 2018 · 1 comment

Comments

@jmason42
Copy link
Contributor

In my experience, the np.random.exponential(a) function is slower than the (presumably) equivalent 1/a * np.log(1/np.random.uniform(0,1)) approach for generating exponentially distributed random numbers. This is a little strange and bears further inspection (e.g. maybe the latter approach has some bad behavior in the extremes). Regardless we should pick the best (fastest while still accurate) approach.

@jmason42
Copy link
Contributor Author

There's a decent change that this effect is particular to Numba JIT'd code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant