[Numpy-discussion] Test error with ATLAS, Windows 64 bit

Carl Kleffner cmkleffner at gmail.com
Mon Apr 14 16:43:17 EDT 2014


Hi,

mingw has expm1. Is this function suitable?

Regards

Carl




2014-04-14 21:34 GMT+02:00 Eric Moore <ewm at redtetrahedron.org>:

>
>
> On Monday, April 14, 2014, Matthew Brett <matthew.brett at gmail.com> wrote:
>
>> Hi,
>>
>> On Mon, Apr 14, 2014 at 12:12 PM, Warren Weckesser
>> <warren.weckesser at gmail.com> wrote:
>> >
>> > On Mon, Apr 14, 2014 at 2:59 PM, Matthew Brett <matthew.brett at gmail.com
>> >
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> With Carl Kleffner, I am trying to build a numpy 1.8.1 wheel for
>> >> Windows 64-bit, and latest stable ATLAS.
>> >>
>> >> It works fine, apart from the following test failure:
>> >>
>> >> ======================================================================
>> >> FAIL: test_special (test_umath.TestExpm1)
>> >> ----------------------------------------------------------------------
>> >> Traceback (most recent call last):
>> >>   File "C:\Python27\lib\site-packages\numpy\core\tests\test_umath.py",
>> >> line 329, in test_special
>> >>     assert_equal(ncu.expm1(-0.), -0.)
>> >>   File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line
>> >> 311, in assert_equal
>> >>     raise AssertionError(msg)
>> >> AssertionError:
>> >> Items are not equal:
>> >>  ACTUAL: 0.0
>> >>  DESIRED: -0.0
>> >>
>> >> Has anyone seen this?  Is it in fact necessary that expm1(-0.) return
>> >> -0 instead of 0?
>> >>
>> >
>> >
>> > What a cowinky dink.  This moring I ran into this issue in a scipy pull
>> > request (https://github.com/scipy/scipy/pull/3547), and I asked about
>> this
>> > comparison failing on the mailing list a few hours ago.  In the pull
>> > request, the modified function returns -0.0 where it used to return
>> 0.0, and
>> > the test for the value 0.0 failed.  My work-around was to use
>> > `assert_array_equal` instead of `assert_equal`.  The array comparison
>> > functions treat the values -0.0 and 0.0 as equal.  `assert_equal` has
>> code
>> > that checks for signed zeros, and fails if they are not the same sign.
>>
>> Yes, sorry, I should have mentioned that I saw your post too.  I'd
>> live to use that workaround, but it looks like the teste against -0 is
>> intentional, and I was hoping for help understanding.
>>
>> The relevant two lines of the test are:
>>
>>         assert_equal(ncu.expm1(0.), 0.)
>>         assert_equal(ncu.expm1(-0.), -0.)
>>
>> Julian - I think this one is for you - as the author of these lines:
>>
>> f53ab41a numpy/core/tests/test_umath.py     (Julian Taylor
>> 2014-03-02 02:55:30 +0100  329)         assert_equal(ncu.expm1(-0.),
>> -0.)
>>
>> Can you say why you wanted -0 specifically?  Any clue as to why ATLAS
>> 64 bit may give 0 instead?
>>
>> Cheers,
>>
>> Matthew
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>
> I think this is a real bug in the version of exp1m in
> core/src/npymath/npy_math.c.src that's being used since your windows build
> couldn't find a system version of exp1m to use.
>
> Eric
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140414/1c2ae265/attachment.html>


More information about the NumPy-Discussion mailing list