Author: mattip
Branch:
Changeset: r51976:0e3677233cc5
Date: 2012-01-29 05:34 +0200
http://bitbucket.org/pypy/pypy/changeset/0e3677233cc5/
Log: add scalar test to dot
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
@@ -942,11 +942,13 @@
assert sum(a[2,3,2,:] * b[1,2,:,2]) == 499128
def test_dot_constant(self):
- from _numpypy import array
+ from _numpypy import array, dot
a = array(range(5))
b = a.dot(2.5)
for i in xrange(5):
assert b[i] == 2.5 * a[i]
+ c = dot(4, 3.0)
+ assert c == 12.0
def test_dtype_guessing(self):
from _numpypy import array, dtype, float64, int8, bool_
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit