On Wed, 2004-05-19 at 14:25, Sebastian Haase wrote:
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;
I tried this on Fedora-1 i386 with Python-2.3.3 and it returned zero consistently. What platform are you on? Regards, Todd