[Numpy-discussion] how to get an array with "varying" poisson distribution
James Graham
jg307 at cam.ac.uk
Tue Jul 25 05:53:23 EDT 2006
Robert Kern wrote:
> Sebastian Haase wrote:
>> Hi,
>> Essentially I'm looking for the equivalent of what was in numarray:
>> from numarray import random_array
>> random_array.poisson(arr)
>>
>> That is: if for example arr is a 256x256 array of positive integers, then this
>> returns a new array of random numbers than are drawn according to the poisson
>> statistics where arr's value at coordinate y,x determines the mean of the
>> poisson distribution used to generate a new value for y,x.
>
> I'm afraid that at this point in time, the distributions only accept scalar
> values for the parameters. I've thought about reimplementing the distribution
> functions as ufuncs, but that's a hefty chunk of work that won't happen for 1.0.
FWIW, I've had enquires about the availability, or not, of this functionality in
NumPy as well, so when someone does have time to work on it, it will be very
much appreciated.
--
"You see stars that clear have been dead for years
But the idea just lives on..." -- Bright Eyes
More information about the NumPy-Discussion
mailing list