From: Konrad H. <hi...@cn...> - 2001-08-29 14:41:07
|
> > > Is there any way to get invert() to work with complex arrays? > > > > If you mean LinearAlgebra.inverse(), it should work with complex arrays, > > although I haven't checked that for a long time. > > I tested a small matrix and got an error, but I will try again, since > with my luck it was singular :) No need to take chances: >>> from Numeric import * >>> from LinearAlgebra import inverse >>> a = 1.j*array([[1., 0.], [0., 1.]]) >>> a array([[ 0.+1.j, 0.+0.j], [ 0.+0.j, 0.+1.j]]) >>> inverse(a) array([[ 0.-1.j, 0.+0.j], [ 0.+0.j, 0.-1.j]]) So it works for at least one complex matrix. :-) Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- |