scipy: TestExp1.test_branch_cut test failure with Intel Fortran

Running Windows Scipy 1.4.1 (compiled with MKL taken from https://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy) standard test suite with Python 3.7.6 x64 results in failure for TestExp1.test_branch_cut test:

_________________________________________________________________________________________________________ TestExp1.test_branch_cut _________________________________________________________________________________________________________

self = <scipy.special.tests.test_exponential_integrals.TestExp1 object at 0x00000296E7953EC8>

    def test_branch_cut(self):
        assert np.isnan(sc.exp1(-1))
>       assert sc.exp1(complex(-1, 0)).imag == (
            -sc.exp1(complex(-1, -0.0)).imag
        )
E       AssertionError: assert -3.141592653589793 == --3.141592653589793
E        +  where -3.141592653589793 = (-1.8951178163559368-3.141592653589793j).imag
E        +    where (-1.8951178163559368-3.141592653589793j) = <ufunc 'exp1'>((-1+0j))
E        +      where <ufunc 'exp1'> = sc.exp1
E        +      and   (-1+0j) = complex(-1, 0)
E        +  and   -3.141592653589793 = (-1.8951178163559368-3.141592653589793j).imag
E        +    where (-1.8951178163559368-3.141592653589793j) = <ufunc 'exp1'>((-1-0j))
E        +      where <ufunc 'exp1'> = sc.exp1
E        +      and   (-1-0j) = complex(-1, -0.0)

self       = <scipy.special.tests.test_exponential_integrals.TestExp1 object at 0x00000296E7953EC8>

C:\Program Files\Python\3.7.6\lib\site-packages\scipy\special\tests\test_exponential_integrals.py:12: AssertionError

On the same PC package manually compiled with MKL on Ubuntu 18.04 (Python 3.6.5) successfully passes all tests.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 25 (11 by maintainers)

Most upvoted comments

So I went and checked compiler support, and it seems like we might be ok targeting 2003. Opened this issue: https://github.com/scipy/scipy/issues/11421 so that we can make an official decision. Once that’s settled we can proceed here. 🤞 for 2003 support!