[NumPy-Tickets] [NumPy] #533: numpy.trace is slow for small dimensions

NumPy Trac numpy-tickets@scipy....
Fri Jul 15 04:31:38 CDT 2011


#533: numpy.trace is slow for small dimensions
-------------------------------+--------------------------------------------
 Reporter:  pv                 |       Owner:  pv   
     Type:  enhancement        |      Status:  new  
 Priority:  normal             |   Milestone:  2.0.0
Component:  numpy.core         |     Version:  none 
 Keywords:  trace performance  |  
-------------------------------+--------------------------------------------

Comment(by pv):

 A problem is also that `trace` calls `diagonal` at all -- trace can be
 taken without taking a copy of the array, which `diagonal` does. IIRC,
 trace can be implemented by suitable striding. Ditto for `diagonal`,
 although I suppose the semantics shouldn't be changed here.

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


More information about the NumPy-Tickets mailing list