May 19, 2004
11:26 a.m.
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