scipy: BUG: `scipy.linalg.eigh` raises `LinAlgError: Internal Error.`
Describe your issue.
scipy.linalg.eigh
raises LinAlgError: Internal Error.
numpy’s eigh
and evd driver will not raise errors
I’ve uploaded the matrix here, you can load it with np.load
.
- please remove the
.zip
extension format.z01
tomat.z07
(github only allow .zip format) before you can unzip the files. mat.z07.zip mat.z06.zip mat.z05.zip mat.z04.zip mat.z03.zip mat.z02.zip mat.z01.zip mat.zip
Reproducing Code Example
scipy.linalg.eigh(mat)
Error message
LinAlgError: Internal Error.
SciPy/NumPy/Python version information
1.9.3 1.23.5 sys.version_info(major=3, minor=10, micro=4, releaselevel=‘final’, serial=0)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (12 by maintainers)
The error message is coming from the LAPACK driver (See the info parameter here; LAPACK dsyevr ). So we don’t have a control over it. In other words, the problem is internal to LAPACK due to the driver we use and can be originating triangularization or some other part of the algorithm.
NumPy also does no different magic but uses the
evd
driver. Hence you can still use thedriver=evd
. Covariance problems are known to have ill-conditioning. It is very common for us to receive bug reports about it, I don’t know why people end up with those covariance cases but probably ML folks should look into this algorithmically. Don’t know if this is an active research area. But essentially the full spectrum calculations are the culprit if I have to speculate.That worked.
I’m trying to run your example now. It seems to be failing on my system too, it hangs and then my terminal closes unexpectedly. I’ll take a look into this and get back to you, it may take a while as I only really have time to work on SciPy over the weekends.
Maybe you can try this out: https://unix.stackexchange.com/questions/40480/how-to-unzip-a-multipart-spanned-zip-on-linux/40481#40481