From dd13084557f46343b9fac0c02725a826d0ca397b Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Wed, 27 Feb 2013 18:34:50 -0700 Subject: 2to3: Fix callable. --- numpy/matrixlib/tests/test_defmatrix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/matrixlib') diff --git a/numpy/matrixlib/tests/test_defmatrix.py b/numpy/matrixlib/tests/test_defmatrix.py index 0a181fca3..dd0b9ee08 100644 --- a/numpy/matrixlib/tests/test_defmatrix.py +++ b/numpy/matrixlib/tests/test_defmatrix.py @@ -4,6 +4,7 @@ from numpy import matrix, asmatrix, bmat from numpy.matrixlib.defmatrix import matrix_power from numpy.matrixlib import mat import numpy as np +import collections class TestCtor(TestCase): def test_basic(self): @@ -285,7 +286,7 @@ class TestMatrixReturn(TestCase): if attrib.startswith('_') or attrib in excluded_methods: continue f = getattr(a, attrib) - if callable(f): + if isinstance(f, collections.Callable): # reset contents of a a.astype('f8') a.fill(1.0) -- cgit v1.2.1