[Numpy-discussion] problem with poisson generators

Robert Kern rkern at ucsd.edu
Thu Jul 14 00:28:06 CDT 2005

Flavio Coelho wrote:

> I  have  both numeric 23.7 and numarray 1.3.1 installed  and on neither 
> of them I could reproduce the bug when I called them directly from the 
> python interpreter. However they fail on mean 0.0 every time when called 
> within my code. So it appears to me that the Bug you mentioned is not 
> what is causing my problem. It seems to stem from interaction with the 
> way its being called, maybe some carryover from previous calls...
> this is the test I ran on the interpreter:
> [(poisson(i),i) for i in uniform(-20,20,1000) if i<=0]
> I also ran:
>  sum(poisson(0,100000))
> they both worked flawlessly. In the first test I wanted to see if there 
> was some carry over from previous runs when called with various means 
> (which is closer to the way it is used within my code), but it returned 
> zero every time. (I don't use negative means in my code, but I wanted to 
> try it here just in case)

Are you sure that you don't have other versions of Numeric or numarray 
installed that might be getting picked up by your code?

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Numpy-discussion mailing list