summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/tests/test_casting_floatingpoint_errors.py6
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"]: