summaryrefslogtreecommitdiff
path: root/numpy/matrixlib/tests/test_defmatrix.py
diff options
context:
space:
mode:
authorMike Taves <mwtoews@gmail.com>2020-01-22 20:59:58 +1300
committerMike Taves <mwtoews@gmail.com>2020-01-22 22:04:18 +1300
commit1bc1fd6bc2ec9c68997736cec1ce5dd4a625ea2f (patch)
treea6d8caad7d2e691ac44966f61adc174d768f14ee /numpy/matrixlib/tests/test_defmatrix.py
parente94cec800304a6a467cf90ce4e7d3e207770b4b4 (diff)
downloadnumpy-1bc1fd6bc2ec9c68997736cec1ce5dd4a625ea2f.tar.gz
MAINT: Revise imports from collections.abc module
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)