[NumPy-Tickets] [NumPy] #1386: 100 times poorer performance indexing scalar record array

NumPy Trac numpy-tickets@scipy....
Wed Jan 12 02:04:27 CST 2011


#1386: 100 times poorer performance indexing scalar record array
---------------------------+------------------------------------------------
 Reporter:  oscar.bristol  |       Owner:  somebody    
     Type:  defect         |      Status:  needs_review
 Priority:  normal         |   Milestone:  2.0.0       
Component:  numpy.core     |     Version:              
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by jpeel):

  * status:  new => needs_review
  * milestone:  => 2.0.0


Comment:

 The problem was that the scalar void type's setfield method makes a copy
 of the input array even if it is already an array. I made a fast track for
 when the right hand side value is an array. The fast track uses the
 getfield method (which is used in the B['a'][:] scalar example above) to
 get a Numpy array for B['a']. I then just use PyArray_CopyObject to do the
 transfer. Now, this last method of assignment is right with the others in
 time (actually faster than scalar B['a'][:] because a slice is not done).

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


More information about the NumPy-Tickets mailing list