Description of problem: When rebulding python38 module for RHEL 8, numpy fails to build from source with: =================================== FAILURES =================================== ______________________________ TestCond.test_nan _______________________________ self = <numpy.linalg.tests.test_linalg.TestCond object at 0x7fffa7e705b0> def test_nan(self): # nans should be passed through, not converted to infs ps = [None, 1, -1, 2, -2, 'fro'] p_pos = [None, 1, 2, 'fro'] A = np.ones((2, 2)) A[0,1] = np.nan for p in ps: > c = linalg.cond(A, p) A = array([[ 1., nan], [ 1., 1.]]) p = None p_pos = [None, 1, 2, 'fro'] ps = [None, 1, -1, 2, -2, 'fro'] self = <numpy.linalg.tests.test_linalg.TestCond object at 0x7fffa7e705b0> numpy/linalg/tests/test_linalg.py:770: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <__array_function__ internals>:5: in cond ??? numpy/linalg/linalg.py:1740: in cond s = svd(x, compute_uv=False) <__array_function__ internals>:5: in svd ??? numpy/linalg/linalg.py:1648: in svd s = gufunc(a, signature=signature, extobj=extobj) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ err = 'invalid value', flag = 8 def _raise_linalgerror_svd_nonconvergence(err, flag): > raise LinAlgError("SVD did not converge") E numpy.linalg.LinAlgError: SVD did not converge err = 'invalid value' flag = 8 numpy/linalg/linalg.py:106: LinAlgError = 1 failed, 10151 passed, 69 skipped, 173 deselected, 18 xfailed, 1 xpassed in 73.21 seconds = Version-Release number of selected component (if applicable): numpy-1.17.3-6 Steps to Reproduce: 1. Scratch build python38 module for RHEL 8. Additional info: We need to rebuild the module to be able to ship a CVE fix in one of its components so this is kinda important for us.
Upstream skips the test: https://github.com/numpy/numpy/pull/18943/files I've backported the patch.