On Monday 24 July 2006 14:20, 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. > > I'm afraid that, for now, you're stuck with iterating over the values.
Thanks for the reply - maybe this my time to get into weave ;-) Question about distributing and/or making "python-only-changes". How can one distribute modules using weave to other people who might NOT have a C compiler installed ? And further: when I change parts of that module that should not require a recompiling of the C part - is weave smart enough to recognise this ? Thanks, Sebastian (Oops, I just realized that this would be a question maybe for the SciPy list ... I'll assume that it's OK) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion