-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scipy/linalg/tests/test_decomp.py::TestSchur::test_sort test failure #14517
Comments
Thanks for the report @mgorny. On which platform are you? I cannot reproduce this on macOS with master. |
Gentoo Linux, amd64. I suppose this may be relevant:
|
How are you installing SciPy? Are you following this guide https://scipy.github.io/devdocs/dev/contributor/quickstart_ubuntu.html#quickstart-ubuntu? |
I'm trying to package the new version for Gentoo. It's based on the ebuild for 1.6.3: minus |
Ok, I think I've just accidentally discovered an important data point: the tests fail also on 1.6.3, and they did not fail before. Last time I've built scipy 1.6.3 was on 10th of July but i'm not sure if I've run tests then. I'm 90% sure this is due to some other package being upgraded… |
FYI as for the infrastructure goes, we added support for Pythran and some wrapper around boost. |
@mgorny do you still have an issue here? |
I'm sorry, are you asking me to test git master, or retest the versions where I could reproduce it previously? |
I am asking if you still have the problem. In the end did you manage to package SciPy? We did not change anything regarding this specific problem but you might have done something on your side and found a workaround. |
I've just tested 1.6.3 again and it still fails, so I presume 1.7.1 also still fails. To be honest, I've really forgotten about this problem (my plate's pretty full at the moment), and I'm afraid I still have no idea how to address it. |
For some reason the first two columns flipped signs. Annoying indeed but not a blocker at least. Might depend on a multitude of stuff. |
Ok, I've spent the whole day trying to figure this out and it seems to be caused by upgrade of lapack from 3.9.0 to 3.10.0. |
FTR, |
We're seeing this error (failure in TestSchur.test_sort) in the Debian build of scipy 1.7.1 for armhf, |
This has started to fail in the macOS Meson CI job consistently now (see for example https://github.com/scipy/scipy/runs/7772683544?check_suite_focus=true), and I bet that it's due to OpenBLAS |
It looks like the problem is actually the test. The Schur decomposition is not unique. As @ilayn pointed out in a previous comment, in the failing test, the signs of the first two columns of the unitary factor are flipped. One can see that some of the signs in the triangular factor are also flipped, and it turns out that these sign changes are consistent with the sign changes in the unitary factor. Here's the test calculation when it passes:
Compute another Schur decomposition from
Verify that this is a correct Schur decomposition:
Check that
So we have to fix the test. |
The Schur decomposition is not unique, so testing the result of linalg.schur against hard-coded matrices is not reliable. The updated tests check that the desired properties of the result are satisfied, and that the order of the diagonal elements of the triangular matrix agrees with the given 'sort' parameter. Closes scipygh-14517
The Schur decomposition is not unique, so testing the result of linalg.schur against hard-coded matrices is not reliable. The updated tests check that the desired properties of the result are satisfied, and that the order of the diagonal elements of the triangular matrix agrees with the given 'sort' parameter. Closes scipygh-14517
The Schur decomposition is not unique, so testing the result of linalg.schur against hard-coded matrices is not reliable. The updated tests check that the desired properties of the result are satisfied, and that the order of the diagonal elements of the triangular matrix agrees with the given 'sort' parameter. Closes scipygh-14517
scipy/linalg/tests/test_decomp.py::TestSchur::test_sort
test fails in 1.7.1 (IIRC 1.7.0 too).Error message:
Scipy/Numpy/Python version information:
The text was updated successfully, but these errors were encountered: