[SciPy-Dev] scipy.special.expi complex test failure with scipy 0.9, numpy 1.6.1dev
Charles R Harris
charlesr.harris at gmail.com
Fri May 20 19:43:54 EDT 2011
On Fri, May 20, 2011 at 5:05 PM, Christoph Gohlke <cgohlke at uci.edu> wrote:
> Hello,
>
> I am getting the following scipy.special.expi failure when testing scipy
> 0.9, which was built against numpy 1.6.1dev (these are Windows/msvc9/MKL
> builds).
>
> E.g. scipy.special.expi(1e-99+0j) returns -227.3787085+6.2831855j, not
> -227.3787085+0j.
>
> This is not Python 2/3 version or 32/64 bit specific.
>
> Scipy 0.9 built against numpy 1.5.1 passes the test.
>
> Christoph
>
> ======================================================================
> FAIL: test_mpmath.test_expi_complex
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "C:\Python32\lib\site-packages\nose\case.py", line 188, in runTest
> self.test(*self.arg)
> File "C:\Python32\lib\site-packages\numpy\testing\decorators.py",
> line 147, in skipper_func
> return f(*args, **kwargs)
> File
> "C:\Python32\lib\site-packages\scipy\special\tests\test_mpmath.py", line
> 48, in test_expi_complex
> FuncData(sc.expi, dataset, 0, 1).check()
> File
> "C:\Python32\lib\site-packages\scipy\special\tests\testutils.py", line
> 224, in check
> assert_(False, "\n".join(msg))
> File "C:\Python32\lib\site-packages\numpy\testing\utils.py", line 34,
> in assert_
> raise AssertionError(msg)
> AssertionError:
> Max |adiff|: 3.86856e+25
> Max |rdiff|: 0.304157
> Bad results for the following points (in output 0):
> (1e-99+0j) =>
> (-227.37870854150898+6.283185307179586j) !=
> (-227.37870854150898+0j) (rdiff 0.02763312953742352)
> (1.668100537200083e-88+0j) =>
> (-201.5385869423536+6.283185307179586j) !=
> (-201.53858694235356+0j) (rdiff 0.03117609090400528)
> (2.7825594022071145e-77+0j) =>
> (-175.6984653431982+6.283185307179586j) !=
> (-175.6984653431982+0j) (rdiff 0.03576118490794107)
> (4.6415888336126776e-66+0j) =>
> (-149.8583437440428+6.283185307179586j) !=
> (-149.8583437440428+0j) (rdiff 0.041927497329819895)
> (7.742636826811214e-55+0j) =>
> (-124.01822214488739+6.283185307179586j) !=
> (-124.01822214488739+0j) (rdiff 0.050663404123299706)
> (1.2915496650148721e-43+0j) => (-98.178100545732+6.283185307179586j) !=
> (-98.178100545732+0j) (rdiff 0.06399782917222806)
> (2.1544346900318602e-32+0j) => (-72.3379789465766+6.283185307179586j) !=
> (-72.3379789465766+0j) (rdiff 0.08685873449436396)
> (3.5938136638045226e-21+0j) =>
> (-46.49785734742121+6.283185307179586j) !=
> (-46.49785734742121+0j) (rdiff 0.13512849119547773)
> (5.994842503189323e-10+0j) =>
> (-20.657735747666305+6.283185307179586j) !=
> (-20.657735747666308+0j) (rdiff 0.30415653409107984)
> _________
Curious. I don't see this on ubuntu, it looks like a factor of 2*pi*1j is
getting added on. Looks like a corner case involving complex log or some
such.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20110520/8b580d13/attachment.html>
More information about the SciPy-Dev
mailing list