[SciPy-user] linalg.eigvals

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Aug 17 06:23:36 CDT 2005


Hi all,

Is this a bug or a feature

>>> A = mat(1)
>>> linalg.eigvals(A)
array([ 1.+0.j])
>>> A = array(([1]))
>>> linalg.eigvals(A)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/scipy/linalg/decomp.py", line
163, in eigvals
    return eig(a,b=b,left=0,right=0,overwrite_a=overwrite_a)
  File "/usr/lib/python2.4/site-packages/scipy/linalg/decomp.py", line
107, in eig
    raise ValueError, 'expected square matrix'
ValueError: expected square matrix
>>>

Nils



More information about the SciPy-user mailing list