From: Charles G W. <cg...@fn...> - 2000-10-12 18:25:03
|
Aureli Soria Frisch writes: > I have been working with the function (implmenting the Moore-Penrose > generalized inverse) : of the module LinearAlgebra. It seems to > present a bug when operating on matrices of complex numbers. This may or may not be related, but there are definitely problems with arrays of complex numbers sometimes being unneccessarily promoted to type "Object" - for example: Python 2.0b1 (#2, Sep 8 2000, 12:10:17) [GCC 2.95.2 19991024 (release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> from Numeric import * >>> a = array([1,2,3], Complex) >>> a array([ 1.+0.j, 2.+0.j, 3.+0.j]) >>> a % 2.0 array([(1+0j) , 0j , (1+0j) ],'O') And we also know that there are a lot of problems with arrays of type "Object". So it's possible that somehow your Complex array is getting promoted to "Object" and running against a problem there. Just a guess, -cgw |