summaryrefslogtreecommitdiff
path: root/numpy/matrixlib/tests/test_defmatrix.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-04-30 07:06:02 +0000
committerPauli Virtanen <pav@iki.fi>2010-04-30 07:06:02 +0000
commit6dc315f8aa7e67f637bcd2beb0c4105ddfcb4a83 (patch)
treedc381a77caf5913b30df444a1faae8f8d15d4b38 /numpy/matrixlib/tests/test_defmatrix.py
parentbceb9c20700514db5667831ce2878f1660fb071f (diff)
downloadnumpy-6dc315f8aa7e67f637bcd2beb0c4105ddfcb4a83.tar.gz
ENH: core: add .dot() method to ndarrays; a.dot(b) == np.dot(a, b)
Diffstat (limited to 'numpy/matrixlib/tests/test_defmatrix.py')
-rw-r--r--numpy/matrixlib/tests/test_defmatrix.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/matrixlib/tests/test_defmatrix.py b/numpy/matrixlib/tests/test_defmatrix.py
index cb6bd801d..65d79df0b 100644
--- a/numpy/matrixlib/tests/test_defmatrix.py
+++ b/numpy/matrixlib/tests/test_defmatrix.py
@@ -254,7 +254,8 @@ class TestMatrixReturn(TestCase):
'compress' : ([1],),
'repeat' : (1,),
'reshape' : (1,),
- 'swapaxes' : (0,0)
+ 'swapaxes' : (0,0),
+ 'dot': np.array([1.0]),
}
excluded_methods = [
'argmin', 'choose', 'dump', 'dumps', 'fill', 'getfield',
@@ -267,7 +268,7 @@ class TestMatrixReturn(TestCase):
for attrib in dir(a):
if attrib.startswith('_') or attrib in excluded_methods:
continue
- f = eval('a.%s' % attrib)
+ f = getattr(a, attrib)
if callable(f):
# reset contents of a
a.astype('f8')