[SciPy-Dev] scipy.linalg.svdvals and complex

josef.pktd@gmai... josef.pktd@gmai...
Mon Dec 10 19:09:27 CST 2012

I'm trying out potential problems in statsmodels with dtypes, or find
dtypes that work without problems

one exception I get is because svdvals doesn't work with complex type,
while svd does.
Is this a feature or a bug?

>>> scipy.__version__

x is just a random float array
>>> (x+0.1j).dtype

>>> from scipy import linalg
>>> linalg.svdvals(x+0.1j)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\site-packages\scipy\linalg\decomp_svd.py",
line 117, in svdvals
    return svd(a, compute_uv=0, overwrite_a=overwrite_a)
  File "C:\Python26\lib\site-packages\scipy\linalg\decomp_svd.py",
line 81, in svd
    overwrite_a = overwrite_a)
flapack.error: (lwork>=(compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n)))
failed for 2nd keyword lwork: zgesdd:lwork=26

>>> linalg.svd(x+0.1j)
(array([[-0.10514587-0.0248632j , -0.19299488-0.00077008j,
        -0.09957051+0.01354966j, ..., -0.05697563+0.02706233j,


More information about the SciPy-Dev mailing list