-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
defectA clear bug or issue that prevents SciPy from being installed or used as expectedA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.linalg
Milestone
Description
scipy.linalg.logm fails to compute the logarithm of the following (non-diagonalizable) matrix:
https://dl.dropboxusercontent.com/u/5453551/scipy-logm-fail.mat
EDIT: it's also singular, not only non-diagonalizable
from scipy import io, linalg
d = io.loadmat('scipy-logm-fail.mat')
lnA, errest = linalg.logm(d['A'])
# not diagonalizable:
w, v = linalg.eig(d['A'])
s = linalg.svdvals(v)
print(s.min()/s.max())
# -> 3.0988115615e-17
Matlab can do it, so probably Higham has an algorithm that works here.
Fails for Scipy version 0.13.2 (also 0.12.0 fails, so it's not a regression).
The current version of logm can do simpler non-diag cases, e.g. [[1, 1], [0, 1]]
, however.
Metadata
Metadata
Assignees
Labels
defectA clear bug or issue that prevents SciPy from being installed or used as expectedA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.linalg