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
Add in-place poisson random-number generation #238
Conversation
…en in the input array, similarly to what numpy.random.poisson() allows.
There were some failures in the CI. Could you take a look? (Click the red X to see the logs.) |
Hi Andreas, I looked at the CI output but I don't know what going on:
To test in a cleaner (compared to my computer) environment, I just made a notebook on google colab: the tests pass there, so could it be a problem in the CI setup ? I'm not sure which file is missing, could it be g++-7 itself ? |
The
|
Here is a log with that problem. |
Hmm - I thought I had set a tolerance high enough that the ratio of 1000000 values with lambda=10 with value==9 would be close enough to 0.12511, but apparently that's not the case... I tested a few 100's of times with all generators and they got close enough every time. I guess I'll remove that test, it's probably a bad idea to have a numerical test based on random values, the central limit theorem won't get us where we want us every time. |
…hat it'll fail during CI.
Thanks for your contribution! |
Thanks a lot Andreas for including this quickly - and a million thanks again for pyCUDA and pyOpenCL - these are really fantastic tools for my research work (synchrotron-based X-ray imaging).
Vincent
… Le 1 juin 2020 à 18:59, Andreas Klöckner ***@***.***> a écrit :
Thanks for your contribution!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#238 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABBNOX2ICE6KMPON3BBSPT3RUPM7HANCNFSM4NKCJH2A>.
--
Vincent Favre-Nicolin
|
With this version, the input array can be used to supply the per-element lamba value. This is similar to what numpy.random.poisson() allows, either supplying a shape and one lambda value, or an array of lambda values.
This is very useful when simulating detector data for imaging, where each point has a different expected value.
Let me know if you want examples, there are currently none for the random-number generators.