Author: mattip Branch: matrixmath-dot Changeset: r51687:3431bdf3f8a1 Date: 2012-01-22 02:09 +0200 http://bitbucket.org/pypy/pypy/changeset/3431bdf3f8a1/
Log: added test from numpy docstring diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py --- a/pypy/module/micronumpy/test/test_numarray.py +++ b/pypy/module/micronumpy/test/test_numarray.py @@ -892,6 +892,10 @@ [[86, 302, 518], [110, 390, 670], [134, 478, 822]]]).all() c = dot(a, b[:, 2]) assert (c == [[62, 214, 366], [518, 670, 822]]).all() + a = arange(3*4*5*6).reshape((3,4,5,6)) + b = arange(3*4*5*6)[::-1].reshape((5,4,6,3)) + assert dot(a, b)[2,3,2,1,2,2] == 499128 + assert sum(a[2,3,2,:] * b[1,2,:,2]) == 499128 def test_dot_constant(self): from _numpypy import array _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit