summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/tests/test_regression.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 740957215..86b0e48a2 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1449,14 +1449,17 @@ class TestRegression(TestCase):
and not issubclass(x, np.timedelta64))]
a = np.array([], dtypes[0])
failures = []
- for x in dtypes:
- b = a.astype(x)
- for y in dtypes:
- c = a.astype(y)
- try:
- np.dot(b, c)
- except TypeError as e:
- failures.append((x, y))
+ # ignore complex warnings
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', np.ComplexWarning)
+ for x in dtypes:
+ b = a.astype(x)
+ for y in dtypes:
+ c = a.astype(y)
+ try:
+ np.dot(b, c)
+ except TypeError as e:
+ failures.append((x, y))
if failures:
raise AssertionError("Failures: %r" % failures)