[Numpy-discussion] random_array.poisson(0) gives -1 and -2
Sebastian Haase
haase at msg.ucsf.edu
Wed May 19 11:26:07 CDT 2004
Hi,
the random_array poisson functions returns negative values if mean=0:
>>>from numarray import random_array as ra
>>> ra.seed(x=1, y=1)
>>> ra.poisson(0)
5
>>> ra.poisson(0)
-2
My "math book" tells me that it should be always zero.
This seems to be a constructed case, but I'm using this to put
"quantum statistic" into a simulated image:
obj = na.array( something )
imageFromDetector = ra.poisson( obj ) + gaussianNoiseArray
The object array might have lots of zeros surrounding the "actual object".
Thinking of a fluorescent object sending out photons it makes sense to not get
any photons at all from 'empty' regions.
I'm using numarray 0.8;
Thanks for numarray,
Sebastian Haase
More information about the Numpy-discussion
mailing list