<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 14, 2014 at 2:59 PM, Matthew Brett <span dir="ltr"><<a href="mailto:matthew.brett@gmail.com" target="_blank">matthew.brett@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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></blockquote><div><br><br></div><div>What a cowinky dink.  This moring I ran into this issue in a scipy pull request (<a href="https://github.com/scipy/scipy/pull/3547">https://github.com/scipy/scipy/pull/3547</a>), 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.<br>
<br>Warren<br><br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks a lot,<br>
<br>
Matthew<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto: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>