<br><br>On Monday, April 14, 2014, Matthew Brett <<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On Mon, Apr 14, 2014 at 12:12 PM, Warren Weckesser<br>
<<a href="javascript:;" onclick="_e(event, 'cvml', 'warren.weckesser@gmail.com')">warren.weckesser@gmail.com</a>> wrote:<br>
><br>
> On Mon, Apr 14, 2014 at 2:59 PM, Matthew Brett <<a href="javascript:;" onclick="_e(event, 'cvml', 'matthew.brett@gmail.com')">matthew.brett@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> With Carl Kleffner, I am trying to build a numpy 1.8.1 wheel for<br>
>> Windows 64-bit, and latest stable ATLAS.<br>
>><br>
>> It works fine, apart from the following test failure:<br>
>><br>
>> ======================================================================<br>
>> FAIL: test_special (test_umath.TestExpm1)<br>
>> ----------------------------------------------------------------------<br>
>> Traceback (most recent call last):<br>
>>   File "C:\Python27\lib\site-packages\numpy\core\tests\test_umath.py",<br>
>> line 329, in test_special<br>
>>     assert_equal(ncu.expm1(-0.), -0.)<br>
>>   File "C:\Python27\lib\site-packages\numpy\testing\utils.py", line<br>
>> 311, in assert_equal<br>
>>     raise AssertionError(msg)<br>
>> AssertionError:<br>
>> Items are not equal:<br>
>>  ACTUAL: 0.0<br>
>>  DESIRED: -0.0<br>
>><br>
>> Has anyone seen this?  Is it in fact necessary that expm1(-0.) return<br>
>> -0 instead of 0?<br>
>><br>
><br>
><br>
> What a cowinky dink.  This moring I ran into this issue in a scipy pull<br>
> request (<a href="https://github.com/scipy/scipy/pull/3547" target="_blank">https://github.com/scipy/scipy/pull/3547</a>), and I asked about this<br>
> comparison failing on the mailing list a few hours ago.  In the pull<br>
> request, the modified function returns -0.0 where it used to return 0.0, and<br>
> the test for the value 0.0 failed.  My work-around was to use<br>
> `assert_array_equal` instead of `assert_equal`.  The array comparison<br>
> functions treat the values -0.0 and 0.0 as equal.  `assert_equal` has code<br>
> that checks for signed zeros, and fails if they are not the same sign.<br>
<br>
Yes, sorry, I should have mentioned that I saw your post too.  I'd<br>
live to use that workaround, but it looks like the teste against -0 is<br>
intentional, and I was hoping for help understanding.<br>
<br>
The relevant two lines of the test are:<br>
<br>
        assert_equal(ncu.expm1(0.), 0.)<br>
        assert_equal(ncu.expm1(-0.), -0.)<br>
<br>
Julian - I think this one is for you - as the author of these lines:<br>
<br>
f53ab41a numpy/core/tests/test_umath.py     (Julian Taylor<br>
2014-03-02 02:55:30 +0100  329)         assert_equal(ncu.expm1(-0.),<br>
-0.)<br>
<br>
Can you say why you wanted -0 specifically?  Any clue as to why ATLAS<br>
64 bit may give 0 instead?<br>
<br>
Cheers,<br>
<br>
Matthew<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'NumPy-Discussion@scipy.org')">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote><div><br></div><div>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. </div>
<div><br></div>Eric<div><span></span><br><div> </div></div>