The random.shuffle fails if an array is multidimensional and one of the rows is None:
from numpy.random import shuffle
a = [1,2,3,None]
shuffle(a) #Works fine
b = [(1,1),(2,2),(3,3),None]
shuffle(b) #Fails
with the following error message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 4283, in mtrand.RandomState.shuffle (numpy/random/mtrand/mtrand.c:18131)
TypeError: 'NoneType' object is unsliceable
Original ticket http://projects.scipy.org/numpy/ticket/2074 on 2012-03-05 by trac user tillahoffmann, assigned to unknown.
The random.shuffle fails if an array is multidimensional and one of the rows is None:
with the following error message