[Numpy-discussion] Args for rand and randn: call for a vote

Sasha ndarray at mac.com
Wed Jul 12 17:37:34 EDT 2006


On 7/12/06, Alan G Isaac <aisaac at american.edu> 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.




More information about the NumPy-Discussion mailing list