[NumPy-Tickets] [NumPy] #1402: Provide a function to compute the log-determinant

NumPy Trac numpy-tickets@scipy....
Fri Apr 30 14:22:19 CDT 2010


#1402: Provide a function to compute the log-determinant
--------------------------+-------------------------------------------------
 Reporter:  njs           |       Owner:  somebody    
     Type:  enhancement   |      Status:  needs_review
 Priority:  normal        |   Milestone:              
Component:  numpy.linalg  |     Version:              
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by njs):

 Oh, duh, I'm an idiot -- you mean that the 'log(absd, absd)' line in the
 implementation is confusing! Well, I'm not sure. Certainly a comment
 wouldn't hurt, but as a core linear algebra routine, this seems to me
 exactly the sort of place where we should err on the side of speed over
 readability. It's probably not a big hit -- the array in question is the
 diagonal of the matrix whose determinant is being taken, so its size is
 O(sqrt(n)), and we already have to copy it once a few lines earlier (absd
 = absolute(d)). But the cost *is* entirely superfluous.

 On the other hand, that earlier copy could be eliminated (or its cost
 reduced, at least) for real inputs by using np.sign, but it didn't seem
 worth it to write separate branches for real and complex inputs, so I
 can't exactly claim to be consistent.

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


More information about the NumPy-Tickets mailing list