From f59e22561e02a185e57d67d07b423fd429ea35bb Mon Sep 17 00:00:00 2001 From: Ganesh Kathiresan Date: Sun, 30 May 2021 23:19:27 +0530 Subject: [PATCH] BUG, TST: Determine complex types using typecodes --- numpy/ma/tests/test_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index a3a109a1c1fa..15ed26470dea 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -2854,7 +2854,7 @@ def test_inplace_multiplication_array_type(self): def test_inplace_floor_division_scalar_type(self): # Test of inplace division # Check for TypeError in case of unsupported types - unsupported = {np.complex64, np.complex128, np.complex256} + unsupported = {np.dtype(t).type for t in np.typecodes["Complex"]} for t in self.othertypes: with warnings.catch_warnings(record=True) as w: warnings.filterwarnings("always") @@ -2876,7 +2876,7 @@ def test_inplace_floor_division_scalar_type(self): def test_inplace_floor_division_array_type(self): # Test of inplace division # Check for TypeError in case of unsupported types - unsupported = {np.complex64, np.complex128, np.complex256} + unsupported = {np.dtype(t).type for t in np.typecodes["Complex"]} for t in self.othertypes: with warnings.catch_warnings(record=True) as w: warnings.filterwarnings("always")