Skip to content

Commit bea5d1c

Browse files
committed
Restrict signbit check to unary ufuncs where NaN signs matter
1 parent 470c42a commit bea5d1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

quaddtype/tests/test_quaddtype.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ def test_unary_ops(op, val):
120120
float_result = of(float_val)
121121

122122
np.testing.assert_array_equal(np.array(quad_result).astype(float), float_result)
123-
assert np.signbit(float_result) == np.signbit(quad_result)
123+
124+
if op in ["negative", "positive", "absolute", "sign"]:
125+
assert np.signbit(float_result) == np.signbit(quad_result)
124126

125127

126128
def test_inf():

0 commit comments

Comments
 (0)