From: Sasha <nd...@ma...> - 2006-07-12 21:37:37
|
On 7/12/06, Alan G Isaac <ai...@am...> wrote: > On Wed, 12 Jul 2006, Sasha apparently wrote: [snip] > > Add rands(shape, dtype=float, min=default_min(dtype), max=default_max(dtype)) > > to the top level. Suitable defaults can be discussed. A more flexible > > variation could > > be rands(shape, dtype=float, algorithm=default_algorithm(dtype)), but > > that would probably be an overkill. > > My only reason for not exploring this is that recent > decisions seem to preclude it. Specifically, nothing > from the random module remains in the numpy namespace, To the contrary, the recent changes cleared the way for a better random number generator in the numpy namespace. With my proposal, I would predict that rands(n) and rands((n,m)) will be used a lot in tests and examples while more sophisticated functionality will be easily discoverable via help(rands). I can also see some benefit in having rands(n, bool) that is not available at the moment. |