<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -673,6 +673,13 @@ def _check_branch_cut(f, x0, dx, re_sign=1, im_sign=-1, sig_zero_ok=False,
         assert np.all(np.absolute(y0.real - ym.real*re_sign) &lt; atol), (y0, ym)
         assert np.all(np.absolute(y0.imag - ym.imag*im_sign) &lt; atol), (y0, ym)
 
+def test_copysign():
+    assert np.copysign(1, -1) == -1
+    assert 1 / np.copysign(0, -1) &lt; 0
+    assert 1 / np.copysign(0, 1) &gt; 0
+    assert np.signbit(np.copysign(np.nan, -1))
+    assert not np.signbit(np.copysign(np.nan, 1))
+
 def test_pos_nan():
     &quot;&quot;&quot;Check np.nan is a positive nan.&quot;&quot;&quot;
     assert np.signbit(np.nan) == 0</diff>
      <filename>numpy/core/tests/test_umath.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5fd6ae6f7f236cc287601c4b34171667800c762d</id>
    </parent>
  </parents>
  <author>
    <name>cdavid</name>
    <email>cdavid@94b884b6-d6fd-0310-90d3-974f1d3f35e1</email>
  </author>
  <url>http://github.com/cournape/numpy/commit/3b4a07454387baebec71b9d445b5911045c210f2</url>
  <id>3b4a07454387baebec71b9d445b5911045c210f2</id>
  <committed-date>2009-07-01T07:23:24-07:00</committed-date>
  <authored-date>2009-07-01T07:23:24-07:00</authored-date>
  <message>Add basic tests for copysign.

git-svn-id: http://svn.scipy.org/svn/numpy/trunk@7092 94b884b6-d6fd-0310-90d3-974f1d3f35e1</message>
  <tree>7a5ab1daa5869489cc980e6ccbd1e6e09ad23461</tree>
  <committer>
    <name>cdavid</name>
    <email>cdavid@94b884b6-d6fd-0310-90d3-974f1d3f35e1</email>
  </committer>
</commit>
