[NumPy-Tickets] [NumPy] #1869: np.place produce bad data with structured array columns as input

NumPy Trac numpy-tickets@scipy....
Thu Jun 16 04:41:00 CDT 2011


#1869: np.place produce bad data with structured array columns as input
------------------------+---------------------------------------------------
 Reporter:  ged         |       Owner:  somebody   
     Type:  defect      |      Status:  new        
 Priority:  high        |   Milestone:  Unscheduled
Component:  numpy.core  |     Version:  1.6.0      
 Keywords:              |  
------------------------+---------------------------------------------------
 It silently produce bad results, using data from all the array columns,
 instead of just the one column I pass as argument.

 with "a" being a structured array with several columns (let's say x and
 y),
 {{{
 np.place(arr, mask, a['x'])
 }}}
 is roughly equal to:
 {{{
 np.place(arr, mask, a)
 }}}

 The problem is present in at least versions 1.4.1 to 1.6.0. See attached
 test case for details.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1869>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list