diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-04 19:59:28 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-13 09:36:57 -0700 |
commit | 8d2d9a58cc824c6bad6b17e552fbd79f19403756 (patch) | |
tree | db8545c4f12be1efc5fcfa2b7dffe564d50ebb24 /numpy | |
parent | d41f1de03794bee3f722e6921bc5fce5c04cce04 (diff) | |
download | numpy-8d2d9a58cc824c6bad6b17e552fbd79f19403756.tar.gz |
TST: Add type check to not trigger an invalid FPE within PyPy
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_casting_floatingpoint_errors.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/tests/test_casting_floatingpoint_errors.py b/numpy/core/tests/test_casting_floatingpoint_errors.py index 669a0d174..ea348e658 100644 --- a/numpy/core/tests/test_casting_floatingpoint_errors.py +++ b/numpy/core/tests/test_casting_floatingpoint_errors.py @@ -59,8 +59,10 @@ def check_operations(dtype, value): yield assignment # TODO: This constraint is a bug in arr.fill() and should be removed - # e.g. by gh-20924 - if value != 10**100: + # e.g. by gh-20924. The type check works around the fact that + # PyPy seems to create an "invalid" error itself, and we see it + # due to gh-21416. + if type(value) is int and value != 10**100: def fill(): arr = np.empty(3, dtype=dtype) arr.fill(value) |