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

Should poisson be defined for negative lambda? #1303

Open
denisalevi opened this issue May 19, 2021 · 1 comment
Open

Should poisson be defined for negative lambda? #1303

denisalevi opened this issue May 19, 2021 · 1 comment

Comments

@denisalevi
Copy link
Member

Should poisson be working for negative lamda? It currently returns 0. Not sure if this matters, was just surprised. np.random.poisson raises an error for lambda < 0.

from brian2 import *

set_device('cpp_standalone')

lamda = -1
G = NeuronGroup(5, 'x : integer')
G.run_regularly('''x = poisson(lamda)''')
run(defaultclock.dt)
@denisalevi
Copy link
Member Author

Yeah, maybe really not important. Feel free to close this again. I was just a bit confused because the cuRAND host API fails for lambda <= 0. But I just saw that the device API on the other hand doesn't fail and returns 0 for lambda <= 0.

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