Re: [Numpy-discussion] random permutation

2007-01-25 Thread Robert Kern
Ted Horst wrote: > BTW, This test doesn't work on python 2.3 because sorted does not > exist there. Fixed, thank you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an

Re: [Numpy-discussion] random permutation

2007-01-25 Thread Ted Horst
BTW, This test doesn't work on python 2.3 because sorted does not exist there. Ted On Jan 13, 2007, at 15:15, Stefan van der Walt wrote: > On Sat, Jan 13, 2007 at 10:01:59AM -0800, Keith Goodman wrote: >> On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: >>> Keith Goodman wrote: Why is t

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Robert Kern
Charles R Harris wrote: > > On 1/13/07, *Sebastian Haase* <[EMAIL PROTECTED] > > wrote: > > > > I understand this - but I thought the algorithm might involve some > rounding(-error) cases that would produce different results especially > when changing the C

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Charles R Harris
On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: I understand this - but I thought the algorithm might involve some rounding(-error) cases that would produce different results especially when changing the CPU (intel vs. PowerPC). I found this to be true even for non pseudo-random code th

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Stefan van der Walt
On Sat, Jan 13, 2007 at 10:01:59AM -0800, Keith Goodman wrote: > On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Keith Goodman wrote: > > > Why is the first element of the permutation always the same? Am I > > > using random.permutation in the right way? > > > > >>> M.__version__ > > > '1.0r

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Sebastian Haase
On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > > On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > > > On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > > > >

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Keith Goodman
On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > > On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > > > On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > > > > Ke

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Sebastian Haase
On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > > On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > > > Keith Goodman wrote: > > > > > Why is the first element of the perm

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Keith Goodman
On 1/13/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > > Keith Goodman wrote: > > > > Why is the first element of the permutation always the same? Am I > > > > using random.permutation

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Sebastian Haase
On 1/13/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Keith Goodman wrote: > > > Why is the first element of the permutation always the same? Am I > > > using random.permutation in the right way? > > > > >>> M.__version__ > > > '1.0rc1' > > >

Re: [Numpy-discussion] random permutation

2007-01-13 Thread Keith Goodman
On 1/11/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Keith Goodman wrote: > > Why is the first element of the permutation always the same? Am I > > using random.permutation in the right way? > > >>> M.__version__ > > '1.0rc1' > > This has been fixed in more recent versions. > > http://projects.sc

Re: [Numpy-discussion] random permutation

2007-01-11 Thread Robert Kern
Keith Goodman wrote: > Why is the first element of the permutation always the same? Am I > using random.permutation in the right way? >>> M.__version__ > '1.0rc1' This has been fixed in more recent versions. http://projects.scipy.org/scipy/numpy/ticket/374 -- Robert Kern "I have come to bel

[Numpy-discussion] random permutation

2007-01-11 Thread Keith Goodman
Why is the first element of the permutation always the same? Am I using random.permutation in the right way? >> x matrix([[0], [1], [2], [3]]) >> M.random.permutation(x) array([[0], [1], [1], [0]]) >> M.random.permutation(x) array([[0], [1],