Skip to content
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

BUG: linalg errors on windows + openblas w/ complex numbers #17869

Closed
h-vetinari opened this issue Jan 27, 2023 · 2 comments
Closed

BUG: linalg errors on windows + openblas w/ complex numbers #17869

h-vetinari opened this issue Jan 27, 2023 · 2 comments
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.linalg
Milestone

Comments

@h-vetinari
Copy link
Member

Seeing these errors in conda-forge for 1.10 and 1.9. Note that openblas is not the default for windows in conda-forge, so this should hopefully not be that widespread.

5/7 have something to do with LDL and all of them seem to involve complex numbers.

=========================== short test summary info ===========================
FAILED linalg/tests/test_blas.py::TestFBLAS2Simple::test_syr_her - AssertionE...
FAILED linalg/tests/test_decomp.py::TestEig::test_bad_geneig - AssertionError: 
FAILED linalg/tests/test_decomp_ldl.py::test_simple - AssertionError: 
FAILED linalg/tests/test_decomp_ldl.py::test_ldl_type_size_combinations_complex[30-complex64]
FAILED linalg/tests/test_decomp_ldl.py::test_ldl_type_size_combinations_complex[30-complex128]
FAILED linalg/tests/test_decomp_ldl.py::test_ldl_type_size_combinations_complex[150-complex64]
FAILED linalg/tests/test_decomp_ldl.py::test_ldl_type_size_combinations_complex[150-complex128]
= 7 failed, 50095 passed, 2325 skipped, 255 xfailed, 9 xpassed, 271 warnings in 953.33s (0:15:53) =
Full error log from pytest
================================== FAILURES ===================================
________________________ TestFBLAS2Simple.test_syr_her ________________________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_blas.py:316: in test_syr_her
    assert_allclose(f(1.0, z), resz, rtol=rtol)
        a          = array([[ 1.,  2.,  3.,  4.],
       [ 0.,  4.,  6.,  8.],
       [ 0.,  0.,  9., 12.],
       [ 0.,  0.,  0., 16.]])
        b          = array([[ 3.,  6.,  9., 12.],
       [ 0., 12., 18., 24.],
       [ 0.,  0., 27., 36.],
       [ 0.,  0.,  0., 48.]])
        f          = <fortran object>
        p          = 'c'
        rehz       = array([[  5.+0.j,  11.+2.j,  17.+4.j,  23.+6.j],
       [  0.+0.j,  25.+0.j,  39.+2.j,  53.+4.j],
       [  0.+0.j,   0.+0.j,  61.+0.j,  83.+2.j],
       [  0.+0.j,   0.+0.j,   0.+0.j, 113.+0.j]])
        rehz_reverse = array([[113.+0.j,  83.-2.j,  53.-4.j,  23.-6.j],
       [  0.+0.j,  61.+0.j,  39.-2.j,  17.-4.j],
       [  0.+0.j,   0.+0.j,  25.+0.j,  11.-2.j],
       [  0.+0.j,   0.+0.j,   0.+0.j,   5.+0.j]])
        resx       = array([[ 1.,  2.,  3.,  4.],
       [ 0.,  4.,  6.,  8.],
       [ 0.,  0.,  9., 12.],
       [ 0.,  0.,  0., 16.]])
        resx_reverse = array([[16., 12.,  8.,  4.],
       [ 0.,  9.,  6.,  3.],
       [ 0.,  0.,  4.,  2.],
       [ 0.,  0.,  0.,  1.]])
        resz       = array([[ -3.  +4.j,  -5. +10.j,  -7. +16.j,  -9. +22.j],
       [  0.  +0.j,  -7. +24.j,  -9. +38.j, -11. +52.j],
       [  0.  +0.j,   0.  +0.j, -11. +60.j, -13. +82.j],
       [  0.  +0.j,   0.  +0.j,   0.  +0.j, -15.+112.j]])
        resz_reverse = array([[-15.+112.j, -13. +82.j, -11. +52.j,  -9. +22.j],
       [  0.  +0.j, -11. +60.j,  -9. +38.j,  -7. +16.j],
       [  0.  +0.j,   0.  +0.j,  -7. +24.j,  -5. +10.j],
       [  0.  +0.j,   0.  +0.j,   0.  +0.j,  -3.  +4.j]])
        rtol       = 1e-07
        self       = <scipy.linalg.tests.test_blas.TestFBLAS2Simple object at 0x0000013234830C90>
        w          = array([0.+0.j, 1.+2.j, 0.+0.j, 0.+0.j, 3.+4.j, 0.+0.j, 0.+0.j, 5.+6.j,
       0.+0.j, 0.+0.j, 7.+8.j, 0.+0.j])
        x          = array([1., 2., 3., 4.])
        y          = array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. , 5.5, 6. ,
       6.5, 7. , 7.5, 8. ])
        z          = array([1.+2.j, 3.+4.j, 5.+6.j, 7.+8.j])
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=1e-07, atol=0
E
E   Mismatched elements: 13 / 16 (81.2%)
E   Max absolute difference: 113.
E   Max relative difference: 3.79473319
E    x: array([[ -3.  +4.j,  -7. +16.j, -13. +82.j,   0.  +0.j],
E          [  0.  +0.j,  -9. +38.j, -15.+112.j,   0.  +0.j],
E          [ -5. +10.j, -20. +82.j,   0.  +0.j,   0.  +0.j],
E          [ -7. +24.j, -11. +52.j,   0.  +0.j,   0.  +0.j]], dtype=complex64)
E    y: array([[ -3.  +4.j,  -5. +10.j,  -7. +16.j,  -9. +22.j],
E          [  0.  +0.j,  -7. +24.j,  -9. +38.j, -11. +52.j],
E          [  0.  +0.j,   0.  +0.j, -11. +60.j, -13. +82.j],
E          [  0.  +0.j,   0.  +0.j,   0.  +0.j, -15.+112.j]])
        args       = (<function assert_allclose.<locals>.compare at 0x00000132486000E0>, array([[ -3.  +4.j,  -7. +16.j, -13. +82.j,   0.  ...j],
       [  0.  +0.j,   0.  +0.j, -11. +60.j, -13. +82.j],
       [  0.  +0.j,   0.  +0.j,   0.  +0.j, -15.+112.j]]))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
___________________________ TestEig.test_bad_geneig ___________________________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp.py:340: in test_bad_geneig
    self._check_gen_eig(A, B)
        A          = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, -8.9375, 0], [0, 0, 0, -8.9375]]
        B          = [[0, 0, 1, 0], [0, 0, 0, 1], [1, 0, 0, -0.5], [0, 1, 0.5, 0]]
        k          = 5
        matrices   = <function TestEig.test_bad_geneig.<locals>.matrices at 0x00000132477D7BA0>
        self       = <scipy.linalg.tests.test_decomp.TestEig object at 0x0000013234E07590>
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp.py:277: in _check_gen_eig
    assert_allclose(w[perm], wt[permt],
        A          = array([[ 1.    ,  0.    ,  0.    ,  0.    ],
       [ 0.    ,  1.    ,  0.    ,  0.    ],
       [ 0.    ,  0.    , -8.9375,  0.    ],
       [ 0.    ,  0.    ,  0.    , -8.9375]])
        B          = array([[ 0. ,  0. ,  1. ,  0. ],
       [ 0. ,  0. ,  0. ,  1. ],
       [ 1. ,  0. ,  0. , -0.5],
       [ 0. ,  1. ,  0.5,  0. ]])
        B0         = array([[ 0. ,  0. ,  1. ,  0. ],
       [ 0. ,  0. ,  0. ,  1. ],
       [ 1. ,  0. ,  0. , -0.5],
       [ 0. ,  1. ,  0.5,  0. ]])
        beta_nonzero = array([ True,  True,  True,  True])
        i          = 3
        length     = array([1., 1., 1., 1.])
        msg        = '\narray([[ 1.    ,  0.    ,  0.    ,  0.    ],\n       [ 0.    ,  1.    ,  0.    ,  0.    ],\n       [ 0.    ,  0.   ... ,  1. ,  0. ],\n       [ 0. ,  0. ,  0. ,  1. ],\n       [ 1. ,  0. ,  0. , -0.5],\n       [ 0. ,  1. ,  0.5,  0. ]])'
        perm       = array([3, 2, 1, 0], dtype=int64)
        permt      = array([1, 3, 2, 0], dtype=int64)
        res        = array([[ 5.55111512e-16+0.00000000e+00j,  5.55111512e-16+0.00000000e+00j,
         7.98297505e-17-4.44089210e-16j,  7....0000e+00j,  8.88178420e-16+0.00000000e+00j,
        -3.89981295e-17+0.00000000e+00j, -3.89981295e-17+0.00000000e+00j]])
        self       = <scipy.linalg.tests.test_decomp.TestEig object at 0x0000013234E07590>
        val1       = array([[-6.75837818e-01+0.00000000e+00j, -6.75837818e-01+0.00000000e+00j,
         9.65826743e-17+6.64534303e-01j,  9....0000e+00j,  1.85855400e+00+0.00000000e+00j,
        -5.64792532e-16+2.15973648e+00j, -5.64792532e-16-2.15973648e+00j]])
        val2       = array([[-6.75837818e-01+0.00000000e+00j, -6.75837818e-01-0.00000000e+00j,
         1.67529238e-17+6.64534303e-01j,  1....0000e+00j,  1.85855400e+00+0.00000000e+00j,
        -5.25794402e-16+2.15973648e+00j, -5.25794402e-16-2.15973648e+00j]])
        vr         = array([[-6.75837818e-01+0.00000000e+00j, -6.75837818e-01+0.00000000e+00j,
         9.65826743e-17+6.64534303e-01j,  9....0000e+00j, -2.07950098e-01+0.00000000e+00j,
         6.31935700e-17-2.41648837e-01j,  6.31935700e-17+2.41648837e-01j]])
        w          = array([ 0.00000000e+00+3.25j,  0.00000000e+00-3.25j,
       -3.86678798e-17+2.75j, -3.86678798e-17-2.75j])
        w_fin      = array([ 0.00000000e+00+3.25j,  0.00000000e+00-3.25j,
       -3.86678798e-17+2.75j, -3.86678798e-17-2.75j])
        wh         = array([ 0.00000000e+00+3.25j,  0.00000000e+00-3.25j,
       -3.86678798e-17+2.75j, -3.86678798e-17-2.75j])
        wt         = array([0.+3.25j, 0.-3.25j, 0.+2.75j, 0.-2.75j])
        wt_fin     = array([0.+3.25j, 0.-3.25j, 0.+2.75j, 0.-2.75j])
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=1e-07, atol=1e-07
E
E   array([[ 1.    ,  0.    ,  0.    ,  0.    ],
E          [ 0.    ,  1.    ,  0.    ,  0.    ],
E          [ 0.    ,  0.    , -8.9375,  0.    ],
E          [ 0.    ,  0.    ,  0.    , -8.9375]])
E   array([[ 0. ,  0. ,  1. ,  0. ],
E          [ 0. ,  0. ,  0. ,  1. ],
E          [ 1. ,  0. ,  0. , -0.5],
E          [ 0. ,  1. ,  0.5,  0. ]])
E   Mismatched elements: 3 / 4 (75%)
E   Max absolute difference: 6.
E   Max relative difference: 2.18181818
E    x: array([-3.866788e-17-2.75j, -3.866788e-17+2.75j,  0.000000e+00-3.25j,
E           0.000000e+00+3.25j])
E    y: array([0.-3.25j, 0.-2.75j, 0.+2.75j, 0.+3.25j])
        args       = (<function assert_allclose.<locals>.compare at 0x0000013249964400>, array([-3.86678798e-17-2.75j, -3.86678798e-17+2.75j,
        0.00000000e+00-3.25j,  0.00000000e+00+3.25j]), array([0.-3.25j, 0.-2.75j, 0.+2.75j, 0.+3.25j]))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': '\narray([[ 1.    ,  0.    ,  0.    ,  0.    ],\n       [ 0.    ,  1.    ,  0.    ,  0....-0.5],\n       [ 0. ,  1. ,  0.5,  0. ]])', 'header': 'Not equal to tolerance rtol=1e-07, atol=1e-07', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
_________________________________ test_simple _________________________________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp_ldl.py:64: in test_simple
    assert_allclose(u.dot(d).dot(u.T), a, atol=spacing(1000.), rtol=0)
        a          = array([[-0.39-0.71j,  5.14-0.64j, -7.86-2.96j,  3.8 +0.92j],
       [ 5.14-0.64j,  8.86+1.81j, -3.52+0.58j,  5.32-1.59...    [-7.86-2.96j, -3.52+0.58j, -2.83-0.03j, -1.54-2.86j],
       [ 3.8 +0.92j,  5.32-1.59j, -1.54-2.86j, -0.56+0.12j]])
        b          = array([[ 5., 10.,  1., 18.],
       [10.,  2., 11.,  1.],
       [ 1., 11., 19.,  9.],
       [18.,  1.,  9.,  0.]])
        c          = array([[ 52.,  97., 112., 107.,  50.],
       [ 97., 114.,  89.,  98.,  13.],
       [112.,  89.,  64.,  33.,   6.],
       [107.,  98.,  33.,  60.,  73.],
       [ 50.,  13.,   6.,  73.,  77.]])
        d          = array([[-3.7989066 -3.32560972j,  0.        +0.j        ,
         0.        +0.j        ,  0.        +0.j        ],
 ...,
       [ 0.        +0.j        ,  0.        +0.j        ,
         0.        +0.j        ,  8.86      +1.81j      ]])
        e          = array([[-1.36+0.j  ,  0.  +0.j  ,  0.  +0.j  ,  0.  +0.j  ],
       [ 1.58-0.9j , -8.87+0.j  ,  0.  +0.j  ,  0.  +0.j ...    [ 2.21+0.21j, -1.84+0.03j, -4.63+0.j  ,  0.  +0.j  ],
       [ 3.91-1.5j , -1.78-1.18j,  0.11-0.11j, -1.84+0.j  ]])
        l          = array([[ 1.        +0.j        ,  0.        +0.j        ,
         0.        +0.j        ,  0.        +0.j        ],
 ...,
       [ 0.44255824+0.19364837j, -0.4822823 +0.01498936j,
        -0.10708219-0.31567809j,  1.        +0.j        ]])
        p          = array([3, 0, 2, 1], dtype=int64)
        u          = array([[ 0.        +0.j        ,  1.        +0.j        ,
         0.        +0.j        ,  0.54272846-0.18310818j],
 ...,
       [ 1.        +0.j        ,  0.50671191+0.06166567j,
        -0.79529754+0.31777367j,  0.54120356-0.29002014j]])
        x          = array([[ 2.,  2., -4.,  0.,  4.],
       [ 2., -2., -2., 10., -8.],
       [-4., -2.,  6., -8., -4.],
       [ 0., 10., -8.,  6., -6.],
       [ 4., -8., -4., -6., 10.]])
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=0, atol=1.13687e-13
E
E   Mismatched elements: 8 / 16 (50%)
E   Max absolute difference: 5.58902689
E   Max relative difference: 9.75886426
E    x: array([[-0.39    -0.71j    ,  5.14    -0.64j    , -9.664201-2.000677j,
E            8.200375-1.876397j],
E          [ 5.14    -0.64j    ,  8.86    +1.81j    , -3.52    +0.58j    ,...
E    y: array([[-0.39-0.71j,  5.14-0.64j, -7.86-2.96j,  3.8 +0.92j],
E          [ 5.14-0.64j,  8.86+1.81j, -3.52+0.58j,  5.32-1.59j],
E          [-7.86-2.96j, -3.52+0.58j, -2.83-0.03j, -1.54-2.86j],
E          [ 3.8 +0.92j,  5.32-1.59j, -1.54-2.86j, -0.56+0.12j]])
        args       = (<function assert_allclose.<locals>.compare at 0x0000013200398680>, array([[-0.39      -0.71j      ,  5.14      -0.64j...   [-7.86-2.96j, -3.52+0.58j, -2.83-0.03j, -1.54-2.86j],
       [ 3.8 +0.92j,  5.32-1.59j, -1.54-2.86j, -0.56+0.12j]]))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=0, atol=1.13687e-13', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
____________ test_ldl_type_size_combinations_complex[30-complex64] ____________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp_ldl.py:135: in test_ldl_type_size_combinations_complex
    assert_allclose(l.dot(d1).dot(l.T), x, rtol=rtol, err_msg=msg2)
        d1         = array([[54000.785+1.1087908j ,     0.   +0.j        ,
            0.   +0.j        ,     0.   +0.j        ,
          ...     0.   +0.j        ,     0.   +0.j        ,
            0.   +0.j        , 53999.426+0.12612048j]], dtype=complex64)
        d2         = array([[54000.785+1.1078861j ,     0.   +0.j        ,
            0.   +0.j        ,     0.   +0.j        ,
          ...     0.   +0.j        ,     0.   +0.j        ,
            0.   +0.j        , 53999.426+0.12616514j]], dtype=complex64)
        dtype      = <class 'numpy.complex64'>
        l          = array([[1.00000000e+00+0.00000000e+00j, 0.00000000e+00+0.00000000e+00j,
        0.00000000e+00+0.00000000e+00j, 0.0000...8e-05+9.18436581e-06j,
        1.42017325e-05+2.91176639e-05j, 1.00000000e+00+0.00000000e+00j]],
      dtype=complex64)
        msg1       = "Her failed for size: 30, dtype: <class 'numpy.complex64'>"
        msg2       = "Sym failed for size: 30, dtype: <class 'numpy.complex64'>"
        n          = 30
        p          = array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype=int64)
        rtol       = 0.0001
        u          = array([[1.00000000e+00+0.00000000e+00j, 2.49239529e-05+2.17918805e-05j,
        7.74376986e-06+2.58192213e-05j, 1.4334...0e+00+0.00000000e+00j,
        0.00000000e+00+0.00000000e+00j, 1.00000000e+00+0.00000000e+00j]],
      dtype=complex64)
        x          = array([[5.4000785e+04+1.1087908j , 1.3460236e+00+1.1776692j ,
        4.1815761e-01+1.3950964j , 7.7402478e-01+1.83984...34j , 9.8578691e-01+0.4960658j ,
        7.6691127e-01+1.5723732j , 5.3999426e+04+0.12616514j]],
      dtype=complex64)
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=0.0001, atol=0
E   Sym failed for size: 30, dtype: <class 'numpy.complex64'>
E   Mismatched elements: 344 / 900 (38.2%)
E   Max absolute difference: 0.0011493
E   Max relative difference: 0.00130331
E    x: array([[5.400079e+04+1.108791j, 1.346023e+00+1.177669j,
E           4.181576e-01+1.395096j, 7.740248e-01+1.839846j,
E           1.477665e+00+0.636326j, 1.263816e+00+1.006168j,...
E    y: array([[5.400079e+04+1.108791j, 1.346024e+00+1.177669j,
E           4.181576e-01+1.395096j, 7.740248e-01+1.839846j,
E           1.477665e+00+0.636326j, 1.263816e+00+1.006168j,...
        args       = (<function assert_allclose.<locals>.compare at 0x000001320039A340>, array([[5.4000785e+04+1.1087908j , 1.3460234e+00+1...4j , 9.8578691e-01+0.4960658j ,
        7.6691127e-01+1.5723732j , 5.3999426e+04+0.12616514j]],
      dtype=complex64))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': "Sym failed for size: 30, dtype: <class 'numpy.complex64'>", 'header': 'Not equal to tolerance rtol=0.0001, atol=0', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
___________ test_ldl_type_size_combinations_complex[30-complex128] ____________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp_ldl.py:135: in test_ldl_type_size_combinations_complex
    assert_allclose(l.dot(d1).dot(l.T), x, rtol=rtol, err_msg=msg2)
        d1         = array([[54000.78335068+1.10879078j,     0.        +0.j        ,
            0.        +0.j        ,     0.        +0.j...  0.        +0.j        ,     0.        +0.j        ,
            0.        +0.j        , 53999.42482147+0.12612047j]])
        d2         = array([[54000.78331776+1.10788596j,     0.        +0.j        ,
            0.        +0.j        ,     0.        +0.j...  0.        +0.j        ,     0.        +0.j        ,
            0.        +0.j        , 53999.42478657+0.12616513j]])
        dtype      = <class 'numpy.complex128'>
        l          = array([[1.00000000e+00+0.00000000e+00j, 0.00000000e+00+0.00000000e+00j,
        0.00000000e+00+0.00000000e+00j, 0.0000...4477933e-06j, 1.82539692e-05+9.18436550e-06j,
        1.42017311e-05+2.91176655e-05j, 1.00000000e+00+0.00000000e+00j]])
        msg1       = "Her failed for size: 30, dtype: <class 'numpy.complex128'>"
        msg2       = "Sym failed for size: 30, dtype: <class 'numpy.complex128'>"
        n          = 30
        p          = array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype=int64)
        rtol       = 1e-10
        u          = array([[1.00000000e+00+0.00000000e+00j, 2.49239524e-05+2.17918759e-05j,
        7.74377038e-06+2.58192204e-05j, 1.4334...0000000e+00j, 0.00000000e+00+0.00000000e+00j,
        0.00000000e+00+0.00000000e+00j, 1.00000000e+00+0.00000000e+00j]])
        x          = array([[5.40007834e+04+1.10879078j, 1.34602348e+00+1.17766919j,
        4.18157619e-01+1.39509641j, 7.74024818e-01+1.8...58569756e-01+0.1970034j , 9.85786867e-01+0.49606578j,
        7.66911259e-01+1.57237316j, 5.39994248e+04+0.12616513j]])
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=1e-10, atol=0
E   Sym failed for size: 30, dtype: <class 'numpy.complex128'>
E   Mismatched elements: 810 / 900 (90%)
E   Max absolute difference: 0.00114976
E   Max relative difference: 0.00130342
E    x: array([[5.400078e+04+1.108791j, 1.346023e+00+1.177669j,
E           4.181576e-01+1.395096j, 7.740248e-01+1.839846j,
E           1.477665e+00+0.636326j, 1.263816e+00+1.006168j,...
E    y: array([[5.400078e+04+1.108791j, 1.346023e+00+1.177669j,
E           4.181576e-01+1.395096j, 7.740248e-01+1.839846j,
E           1.477665e+00+0.636326j, 1.263816e+00+1.006168j,...
        args       = (<function assert_allclose.<locals>.compare at 0x0000013200399E40>, array([[5.40007834e+04+1.10879078j, 1.34602348e+00...8569756e-01+0.1970034j , 9.85786867e-01+0.49606578j,
        7.66911259e-01+1.57237316j, 5.39994248e+04+0.12616513j]]))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': "Sym failed for size: 30, dtype: <class 'numpy.complex128'>", 'header': 'Not equal to tolerance rtol=1e-10, atol=0', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
___________ test_ldl_type_size_combinations_complex[150-complex64] ____________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp_ldl.py:135: in test_ldl_type_size_combinations_complex
    assert_allclose(l.dot(d1).dot(l.T), x, rtol=rtol, err_msg=msg2)
        d1         = array([[412953.62+1.3680098j ,      0.  +0.j        ,
             0.  +0.j        , ...,      0.  +0.j        ,
     ... 0.  +0.j        , ...,      0.  +0.j        ,
             0.  +0.j        , 412953.34+0.34275013j]], dtype=complex64)
        d2         = array([[412953.62+1.3673234j ,      0.  +0.j        ,
             0.  +0.j        , ...,      0.  +0.j        ,
     ... 0.  +0.j        , ...,      0.  +0.j        ,
             0.  +0.j        , 412953.34+0.34341592j]], dtype=complex64)
        dtype      = <class 'numpy.complex64'>
        l          = array([[1.0000000e+00+0.0000000e+00j, 0.0000000e+00+0.0000000e+00j,
        0.0000000e+00+0.0000000e+00j, ..., 0.00000...206833e-06+3.4594916e-06j,
        2.7559854e-06+2.6710200e-06j, 1.0000000e+00+0.0000000e+00j]],
      dtype=complex64)
        msg1       = "Her failed for size: 150, dtype: <class 'numpy.complex64'>"
        msg2       = "Sym failed for size: 150, dtype: <class 'numpy.complex64'>"
        n          = 150
        p          = array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
        13,  14,  15,  16,  17,  18,  19,  20,...30, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
       143, 144, 145, 146, 147, 148, 149], dtype=int64)
        rtol       = 0.0001
        u          = array([[1.0000000e+00+0.0000000e+00j, 2.1397996e-06+3.8598864e-06j,
        4.1502435e-06+2.6572809e-06j, ..., 3.24332...000000e+00+0.0000000e+00j,
        0.0000000e+00+0.0000000e+00j, 1.0000000e+00+0.0000000e+00j]],
      dtype=complex64)
        x          = array([[4.1295362e+05+1.3680098j , 8.8362283e-01+1.5946665j ,
        1.7138696e+00+1.098035j  , ..., 1.3393495e+00+0.... ..., 5.0403839e-01+1.4292638j ,
        1.1380554e+00+1.1036768j , 4.1295334e+05+0.34341592j]],
      dtype=complex64)
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=0.0001, atol=0
E   Sym failed for size: 150, dtype: <class 'numpy.complex64'>
E   Mismatched elements: 4 / 22500 (0.0178%)
E   Max absolute difference: 9.4652176e-05
E   Max relative difference: 0.00015915
E    x: array([[4.129536e+05+1.36801j , 8.836228e-01+1.594666j,
E           1.713869e+00+1.098035j, ..., 1.339350e+00+0.934285j,
E           1.668266e+00+0.970734j, 1.257340e+00+0.451682j],...
E    y: array([[4.129536e+05+1.36801j , 8.836228e-01+1.594666j,
E           1.713870e+00+1.098035j, ..., 1.339350e+00+0.934285j,
E           1.668266e+00+0.970734j, 1.257340e+00+0.451682j],...
        args       = (<function assert_allclose.<locals>.compare at 0x000001320039AB60>, array([[4.1295362e+05+1.3680098j , 8.8362283e-01+1......, 5.0403839e-01+1.4292638j ,
        1.1380554e+00+1.1036768j , 4.1295334e+05+0.34341592j]],
      dtype=complex64))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': "Sym failed for size: 150, dtype: <class 'numpy.complex64'>", 'header': 'Not equal to tolerance rtol=0.0001, atol=0', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
___________ test_ldl_type_size_combinations_complex[150-complex128] ___________
[gw1] win32 -- Python 3.11.0 %PREFIX%\python.exe
..\_test_env\Lib\site-packages\scipy\linalg\tests\test_decomp_ldl.py:135: in test_ldl_type_size_combinations_complex
    assert_allclose(l.dot(d1).dot(l.T), x, rtol=rtol, err_msg=msg2)
        d1         = array([[412953.61249865+1.36800983j,      0.        +0.j        ,
             0.        +0.j        , ...,      0.   ...    +0.j        , ...,      0.        +0.j        ,
             0.        +0.j        , 412953.34945125+0.34275013j]])
        d2         = array([[412953.61248539+1.36732338j,      0.        +0.j        ,
             0.        +0.j        , ...,      0.   ...    +0.j        , ...,      0.        +0.j        ,
             0.        +0.j        , 412953.34938386+0.34341591j]])
        dtype      = <class 'numpy.complex128'>
        l          = array([[1.00000000e+00+0.00000000e+00j, 0.00000000e+00+0.00000000e+00j,
        0.00000000e+00+0.00000000e+00j, ...,
 ... ...,
        1.22068339e-06+3.45949159e-06j, 2.75598527e-06+2.67101981e-06j,
        1.00000000e+00+0.00000000e+00j]])
        msg1       = "Her failed for size: 150, dtype: <class 'numpy.complex128'>"
        msg2       = "Sym failed for size: 150, dtype: <class 'numpy.complex128'>"
        n          = 150
        p          = array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
        13,  14,  15,  16,  17,  18,  19,  20,...30, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
       143, 144, 145, 146, 147, 148, 149], dtype=int64)
        rtol       = 1e-10
        u          = array([[1.00000000e+00+0.00000000e+00j, 2.13979946e-06+3.85988687e-06j,
        4.15024407e-06+2.65728080e-06j, ...,
 ... ...,
        0.00000000e+00+0.00000000e+00j, 0.00000000e+00+0.00000000e+00j,
        1.00000000e+00+0.00000000e+00j]])
        x          = array([[4.12953612e+05+1.36800983j, 8.83622804e-01+1.59466645j,
        1.71386963e+00+1.098035j  , ..., 1.33934960e+0...030e+00+1.79731581j, ..., 5.04038398e-01+1.42926379j,
        1.13805546e+00+1.10367687j, 4.12953349e+05+0.34341591j]])
..\_test_env\Lib\contextlib.py:81: in inner
    return func(*args, **kwds)
E   AssertionError:
E   Not equal to tolerance rtol=1e-10, atol=0
E   Sym failed for size: 150, dtype: <class 'numpy.complex128'>
E   Mismatched elements: 474 / 22500 (2.11%)
E   Max absolute difference: 0.00010027
E   Max relative difference: 0.00015921
E    x: array([[4.129536e+05+1.36801j , 8.836228e-01+1.594666j,
E           1.713870e+00+1.098035j, ..., 1.339350e+00+0.934285j,
E           1.668266e+00+0.970734j, 1.257340e+00+0.451682j],...
E    y: array([[4.129536e+05+1.36801j , 8.836228e-01+1.594666j,
E           1.713870e+00+1.098035j, ..., 1.339350e+00+0.934285j,
E           1.668266e+00+0.970734j, 1.257340e+00+0.451682j],...
        args       = (<function assert_allclose.<locals>.compare at 0x000001320039B240>, array([[4.12953612e+05+1.36800983j, 8.83622804e-01...30e+00+1.79731581j, ..., 5.04038398e-01+1.42926379j,
        1.13805546e+00+1.10367687j, 4.12953349e+05+0.34341591j]]))
        func       = <function assert_array_compare at 0x000001322F323420>
        kwds       = {'equal_nan': True, 'err_msg': "Sym failed for size: 150, dtype: <class 'numpy.complex128'>", 'header': 'Not equal to tolerance rtol=1e-10, atol=0', 'verbose': True}
        self       = <contextlib._GeneratorContextManager object at 0x000001322F330B10>
@h-vetinari
Copy link
Member Author

While I tried searching for related issues before, I didn't check all tests. It seems that the test_bad_geneig failure already has a dedicated issue: #17125

@rgommers rgommers added the defect A clear bug or issue that prevents SciPy from being installed or used as expected label Jan 28, 2023
@h-vetinari
Copy link
Member Author

While I tried searching for related issues before, I didn't check all tests. It seems that the test_bad_geneig failure already has a dedicated issue: #17125

As of 1.11.0, all failures but test_bad_geneig are resolved. 🥳

Since that failure has a dedicated issue, I'll close this one.

@h-vetinari h-vetinari added this to the 1.11.0 milestone Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.linalg
Projects
None yet
Development

No branches or pull requests

2 participants