scipy.linalg.tests.test_interpolative::TestInterpolativeDecomposition::test_id fails on 32-bit intel
See original GitHub issueReproducing code example:
python3.6 runtests.py -v -t scipy.linalg.tests.test_interpolative::TestInterpolativeDecomposition::test_id
Error message:
Building, see build.log...
Build OK (0:00:02.503862 elapsed)
============================= test session starts ==============================
platform linux -- Python 3.6.6+, pytest-3.6.4, py-1.5.4, pluggy-0.6.0 -- /usr/bin/python3.6
cachedir: ../../../../../.pytest_cache
rootdir: /root/scipy, inifile: pytest.ini
collecting ... collected 1 item
scipy/linalg/tests/test_interpolative.py::TestInterpolativeDecomposition::test_id FAILED [100%]
=================================== FAILURES ===================================
____________________ TestInterpolativeDecomposition.test_id ____________________
self = <scipy.linalg.tests.test_interpolative.TestInterpolativeDecomposition object at 0xf4ee6cac>
def test_id(self):
for dtype in [np.float64, np.complex128]:
> self.check_id(dtype)
dtype = <class 'numpy.complex128'>
self = <scipy.linalg.tests.test_interpolative.TestInterpolativeDecomposition object at 0xf4ee6cac>
scipy/linalg/tests/test_interpolative.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <scipy.linalg.tests.test_interpolative.TestInterpolativeDecomposition object at 0xf4ee6cac>
dtype = <class 'numpy.complex128'>
def check_id(self, dtype):
# Test ID routines on a Hilbert matrix.
# set parameters
n = 300
eps = 1e-12
# construct Hilbert matrix
A = hilbert(n).astype(dtype)
if np.issubdtype(dtype, np.complexfloating):
A = A * (1 + 1j)
L = aslinearoperator(A)
# find rank
S = np.linalg.svd(A, compute_uv=False)
try:
rank = np.nonzero(S < eps)[0][0]
except IndexError:
rank = n
# print input summary
_debug_print("Hilbert matrix dimension: %8i" % n)
_debug_print("Working precision: %8.2e" % eps)
_debug_print("Rank to working precision: %8i" % rank)
# set print format
fmt = "%8.2e (s) / %5s"
# test real ID routines
_debug_print("-----------------------------------------")
_debug_print("Real ID routines")
_debug_print("-----------------------------------------")
# fixed precision
_debug_print("Calling iddp_id / idzp_id ...",)
t0 = time.time()
k, idx, proj = pymatrixid.interp_decomp(A, eps, rand=False)
t = time.time() - t0
B = pymatrixid.reconstruct_matrix_from_id(A[:, idx[:k]], idx, proj)
_debug_print(fmt % (t, np.allclose(A, B, eps)))
> assert_(np.allclose(A, B, eps))
E AssertionError
A = array([[1. +1.j , 0.5 +0.5j ,
0.33333333+0.33333333j, ..., 0.0033557 +0.0033557j ,
...
0.00331126+0.00331126j, ..., 0.00167504+0.00167504j,
0.00167224+0.00167224j, 0.00166945+0.00166945j]])
B = array([[1. +1.00000000e+00j, 0.5 +5.00000000e-01j,
0.33333333+3.33333333e-01j, ..., 0.00252299+3....126+3.31125828e-03j, ..., 0.00240064+4.01219469e-04j,
0.00239738+3.93272780e-04j, 0.00239412+3.85406210e-04j]])
L = <300x300 MatrixLinearOperator with dtype=complex128>
S = array([3.28383209e+00, 1.46118973e+00, 4.85550807e-01, 1.40695788e-01,
3.77404295e-02, 9.57267036e-03, 2.318987...3.61515144e-19, 3.44841007e-19, 2.67885523e-19,
2.14393434e-19, 1.38418788e-19, 1.08774972e-19, 3.53735496e-20])
dtype = <class 'numpy.complex128'>
eps = 1e-12
fmt = '%8.2e (s) / %5s'
idx = array([ 0, 76, 1, 134, 2, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20,..., 282, 283, 284, 285,
286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299], dtype=int32)
k = 5
n = 300
proj = array([[ 1.14253932e+00+8.14415919e-01j, 1.02685117e+00+7.27996082e-01j,
9.31616510e-01+6.56616558e-01j, .......,
-6.28869125e-03-4.88365418e-03j, -6.30277694e-03-4.85859879e-03j,
-6.31662104e-03-4.83374460e-03j]])
rank = 20
self = <scipy.linalg.tests.test_interpolative.TestInterpolativeDecomposition object at 0xf4ee6cac>
t = 0.0024597644805908203
t0 = 1536620034.2090552
scipy/linalg/tests/test_interpolative.py:89: AssertionError
=========================== 1 failed in 0.55 seconds ===========================
Scipy/Numpy/Python version information:
1.2.0.dev0+641bc92 1.14.5 sys.version_info(major=3, minor=6, micro=6, releaselevel='final', serial=0)
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
linalg tests failing in runtests.py #11601 - scipy/scipy - GitHub
My issue is about working on a code change in scipy.special tests passed in special when performing full test suite before opening a...
Read more >SciPy 1.9.0 Release Notes — SciPy v1.9.3 Manual
SciPy 1.9.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better...
Read more >SciPy 1.6.0 Release Notes — SciPy v1.9.3 Manual
The new function scipy.linalg.matmul_toeplitz uses the FFT to compute the ... #12899: TST: make a couple of tests expected to fail on 32-bit...
Read more >SciPy 1.5.0 Release Notes — SciPy v1.9.3 Manual
SciPy 1.5.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better...
Read more >SciPy 1.7.0 Release Notes — SciPy v1.9.3 Manual
The new function scipy.stats.page_trend_test performs Page's test for ordered ... #14170: TST: signal submodule test_filtfilt_gust failing on 32-bit amd64…
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve found a ridiculous patch for this
(On Debian) with gfortran-7 test passed with this patch, with gfortran-8 test passed with no “aaa” output!
Let me just copy the whole failure before it disappears: