[Numpy-discussion] numpy.random.rand function doesn't take tuple

David Grant davidgrant at gmail.com
Mon Aug 21 18:26:10 CDT 2006


On 8/21/06, Robert Kern <robert.kern at gmail.com> wrote:
>
> David Grant wrote:
> > I was a bit surprised today to find that numpy.random.rand doesn't
> > take in a tuple as input for the dimensions of the desired array. I am
> > very used to using a tuple for zeros, ones. Also, wouldn't this mean
> > that it would not be possible to add other non-keyword arguments to
> > rand later?
>
> Don't use rand(), then. Use random(). rand()'s sole purpose in life is to
> *not*
> take a tuple. If you like, you can read the archives on the several (long)
> discussions on this and why things are the way they are now. We finally
> achieved
> something resembling consensus, so please let's not resurrect this
> argument.



Thanks everyone. My only question now is why there is random_sample and
random. My guess is that one is there for compatibility with older releases
and so I'm not bothered by it.


-- 
David Grant
http://www.davidgrant.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060821/e845a6a4/attachment.html 


More information about the Numpy-discussion mailing list