Bug 2217862 - python38:3.8 - numpy FTBFS - TestCond.test_nan failed on x86_64
Summary: python38:3.8 - numpy FTBFS - TestCond.test_nan failed on x86_64
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: numpy
Version: 8.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Charalampos Stratakis
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-27 10:06 UTC by Lumír Balhar
Modified: 2023-08-17 14:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-160902 0 None None None 2023-06-27 10:08:47 UTC

Description Lumír Balhar 2023-06-27 10:06:19 UTC
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.

Comment 2 Charalampos Stratakis 2023-07-17 23:08:11 UTC
Upstream skips the test: https://github.com/numpy/numpy/pull/18943/files

I've backported the patch.


Note You need to log in before you can comment on or make changes to this bug.