[PYTHON MATRIX-SIG] Bug in LinearAlgebra

Konrad Hinsen hinsen@ibs.ibs.fr
Wed, 16 Oct 96 12:08:55 +0100


> > Here's the fixed (but not really tested) version of determinant:
> > 
> > def determinate(a):
> >     _assertRank2(a)
> >     _assertSquareness(a)
> >     ev = eigenvalues(a)
> >     return Numeric.product(ev)
> 
> If somebody more LA familiar than myself can confirm and test this I'll
> make the change in the standard distribution.

That is indeed a correct way to calculate the determinant, although
not the most efficient one (LU decomposition is faster). If I find the
time I'll do something better, but this one is of course much
preferable to the current (wrong) function. But please also correct
the name to "determinant"!

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================