[Numpy-discussion] bug with numpy.linalg.eig for complex output
Bill Baxter
wbaxter at gmail.com
Thu Aug 17 23:13:06 CDT 2006
If you do this:
>>> numpy.linalg.eig(numpy.random.rand(3,3))
You'll (almost always) get a wrong answer back from numpy. Something like:
(array([ 1.72167898, -0.07251007, -0.07251007]),
array([[ 0.47908847, 0.72095163, 0.72095163],
[ 0.56659142, -0.46403504, -0.46403504],
[ 0.67040914, 0.01361572, 0.01361572]]))
The return value should be complex (unless rand() just happens to return
something symmetric).
It really needs to either throw an exception, or preferably for this
function, just go ahead and return something complex, like the
numpy.dftfunctions do.
On the other hand it, would be nice to stick with plain doubles if the
output isn't complex, but I'd rather get the right output all the time than
get the minimal type that will handle the output.
This is with beta 1.
Incidentally, I tried logging into the Trac here:
http://projects.scipy.org/scipy/scipy
to file a bug, but it wouldn't let me in under the account I've been using
for a while now. Is the login system broken? Were passwords reset or
something?
--bb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060818/6e33a99d/attachment.html
More information about the Numpy-discussion
mailing list