[Numpy-discussion] Possible bug in LinearAlgebra module
Charles G Waldman
cgw at fnal.gov
Thu Oct 12 14:24:55 EDT 2000
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
More information about the NumPy-Discussion
mailing list