Re: [Numpy-discussion] Question about numpy.random, especially .poisson

2011-04-18 Thread Robert Kern
On Mon, Apr 18, 2011 at 17:08, Russell E. Owen wrote: > I stumbled across code that looks like this: > > imageArr = # a 2-d array of floats > noiseArr = numpy.random.poisson(imageArr) > > This works fine in numpy 1.5.1 and seems to do what I would hope: return > an array of random ints whose "expe

[Numpy-discussion] Question about numpy.random, especially .poisson

2011-04-18 Thread Russell E. Owen
I stumbled across code that looks like this: imageArr = # a 2-d array of floats noiseArr = numpy.random.poisson(imageArr) This works fine in numpy 1.5.1 and seems to do what I would hope: return an array of random ints whose "expectation of interval" is set by the corresponding element of the i