diff options
author | scoder <stefan_ml@behnel.de> | 2015-02-07 14:58:34 +0100 |
---|---|---|
committer | scoder <stefan_ml@behnel.de> | 2015-02-07 14:58:34 +0100 |
commit | 60490a4c95e96faaee0e07982a1a0652ce08cb4f (patch) | |
tree | 2be2907f58e4826e23f460e0c64af6c109839aca | |
parent | bf049f49636249b18515e99bb002b88e8a3fb8f6 (diff) | |
parent | 24cf7c9671b45e891a6c35b4f576fff3dff5c00e (diff) | |
download | cython-60490a4c95e96faaee0e07982a1a0652ce08cb4f.tar.gz |
Merge pull request #369 from larsmans/isinf-test
test: assert that isinf returns -1 for negative infinity
-rw-r--r-- | tests/run/numpy_math.pyx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/run/numpy_math.pyx b/tests/run/numpy_math.pyx index 48fe7cce8..eafd23a81 100644 --- a/tests/run/numpy_math.pyx +++ b/tests/run/numpy_math.pyx @@ -37,7 +37,8 @@ def test_fp_classif(): assert not npmath.isnan(d_zero) assert not npmath.isnan(f_zero) - assert npmath.isinf(npmath.INFINITY) + assert npmath.isinf(npmath.INFINITY) == 1 + assert npmath.isinf(-npmath.INFINITY) == -1 assert npmath.isnan(npmath.NAN) assert npmath.signbit(npmath.copysign(1., -1.)) |