[NumPy-Tickets] [NumPy] #2074: random.shuffle fails if row in multidimensional array is None

NumPy Trac numpy-tickets@scipy....
Mon Jul 9 15:05:42 CDT 2012


#2074: random.shuffle fails if row in multidimensional array is None
---------------------------+------------------------------------------------
 Reporter:  tillahoffmann  |       Owner:  somebody   
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  numpy.random   |     Version:  1.6.1      
 Keywords:  shuffle; None  |  
---------------------------+------------------------------------------------

Comment(by ericfode):

 This also does not work if you have different sized items in the array.
 For example
 [(1,2), 2, (2,2)]
 This is because the shuffle routine assumes that all items are slice-able
 if the first item in the array is.
 Additionally, if the first item is not slice-able (len(item) = 0) it
 assumes all of the items are NOT slice-able and does not explicitly copy
 them.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2074#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list