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

2006-08-21 Thread Bill Baxter
If you like, here's a rand function that takes either a sequence or a tuple.  I use this for interactive sessions.def rand(*shape):    """    Return an array of the given dimensions which is initialized to     random numbers from a uniform distribution in the range [0,1).    rand(d0, d1, ..., dn)

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

2006-08-21 Thread Robert Kern
David Grant wrote: > 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. Yes. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

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

2006-08-21 Thread David Grant
On 8/21/06, Robert Kern <[EMAIL PROTECTED]> 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

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

2006-08-21 Thread Robert Kern
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

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

2006-08-21 Thread Alan G Isaac
On Mon, 21 Aug 2006, David Grant apparently 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 > possi

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

2006-08-21 Thread Travis Oliphant
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

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

2006-08-21 Thread David Grant
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? -- David G