
This is certainly a bug. It has been mentioned before, but there was no comment. shuffle() doesn't handle arrays.
from numpy import * from numpy.random import * a = arange(12) a.shape = (6,2) a array([[ 0, 1], [ 2, 3], [ 4, 5], [ 6, 7], [ 8, 9], [10, 11]]) shuffle(a) a array([[ 0, 1], [ 2, 3], [ 2, 3], [ 0, 1], [ 4, 5], [10, 11]])
This is with numpy 1.0. The [0, 1] element was duplicated. That's not right. Tom Holroyd, Ph.D. We experience the world not as it is, but as we expect it to be.

Tom Holroyd wrote:
This is certainly a bug. It has been mentioned before, but there was no comment.
Yes, there was. http://projects.scipy.org/pipermail/numpy-discussion/2006-November/024783.ht... -- 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 underlying truth." -- Umberto Eco

Tom Holroyd wrote:
there was no comment.
On Fri, 08 Dec 2006, Robert Kern apparently wrote:
Yes, there was. http://projects.scipy.org/pipermail/numpy-discussion/2006-November/024783.ht...
Also see the previous comment: http://projects.scipy.org/pipermail/numpy-discussion/2006-November/024782.ht... fwiw, Alan Isaac
participants (3)
-
Alan G Isaac
-
Robert Kern
-
Tom Holroyd