diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-01 08:23:08 -0700 |
|---|---|---|
| committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-13 09:36:57 -0700 |
| commit | b463a7fcee642eb75ec7fd5faa33f3fabbcfb258 (patch) | |
| tree | 44e651380d82be5fb00a752e52a48500e9533cad /numpy | |
| parent | 8d2d9a58cc824c6bad6b17e552fbd79f19403756 (diff) | |
| download | numpy-b463a7fcee642eb75ec7fd5faa33f3fabbcfb258.tar.gz | |
TST: Improve test coverage for complex FPE cast errors
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/tests/test_casting_floatingpoint_errors.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_casting_floatingpoint_errors.py b/numpy/core/tests/test_casting_floatingpoint_errors.py index ea348e658..7248e7a08 100644 --- a/numpy/core/tests/test_casting_floatingpoint_errors.py +++ b/numpy/core/tests/test_casting_floatingpoint_errors.py @@ -34,6 +34,12 @@ def values_and_dtypes(): yield param(np.finfo(np.longdouble).max, "float64", id="longdouble-to-f8") + # Cast to complex32: + yield param(2e300, "complex64", id="float-to-c8") + yield param(2e300+0j, "complex64", id="complex-to-c8") + yield param(2e300j, "complex64", id="complex-to-c8") + yield param(np.longdouble(2e300), "complex64", id="longdouble-to-c8") + # Invalid float to integer casts: with np.errstate(over="ignore"): for to_dt in np.typecodes["AllInteger"]: |
