summaryrefslogtreecommitdiff
path: root/numpy/matrixlib/tests/test_defmatrix.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/matrixlib/tests/test_defmatrix.py')
-rw-r--r--numpy/matrixlib/tests/test_defmatrix.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/numpy/matrixlib/tests/test_defmatrix.py b/numpy/matrixlib/tests/test_defmatrix.py
index a8070898f..4cb5f3a37 100644
--- a/numpy/matrixlib/tests/test_defmatrix.py
+++ b/numpy/matrixlib/tests/test_defmatrix.py
@@ -1,9 +1,4 @@
-try:
- # Accessing collections abstract classes from collections
- # has been deprecated since Python 3.3
- import collections.abc as collections_abc
-except ImportError:
- import collections as collections_abc
+import collections.abc
import numpy as np
from numpy import matrix, asmatrix, bmat
@@ -297,7 +292,7 @@ class TestMatrixReturn:
if attrib.startswith('_') or attrib in excluded_methods:
continue
f = getattr(a, attrib)
- if isinstance(f, collections_abc.Callable):
+ if isinstance(f, collections.abc.Callable):
# reset contents of a
a.astype('f8')
a.fill(1.0)