Author: mattip
Branch: matrixmath-dot
Changeset: r50189:dc6c3373f647
Date: 2011-12-05 09:02 +0200
http://bitbucket.org/pypy/pypy/changeset/dc6c3373f647/
Log: clean compile a bit
diff --git a/pypy/module/micronumpy/compile.py
b/pypy/module/micronumpy/compile.py
--- a/pypy/module/micronumpy/compile.py
+++ b/pypy/module/micronumpy/compile.py
@@ -399,8 +399,10 @@
raise ArgumentNotAnArray
if not isinstance(arr1, BaseArray):
raise ArgumentNotAnArray
- elif self.name == "dot":
+ if self.name == "dot":
w_res = arr0.descr_dot(interp.space, arr1)
+ else:
+ assert False # unreachable code
else:
raise WrongFunctionName
if isinstance(w_res, BaseArray):
diff --git a/pypy/module/micronumpy/test/test_compile.py
b/pypy/module/micronumpy/test/test_compile.py
--- a/pypy/module/micronumpy/test/test_compile.py
+++ b/pypy/module/micronumpy/test/test_compile.py
@@ -235,6 +235,7 @@
a -> 3
""")
assert interp.results[0].value == 11
+
def test_dot(self):
interp = self.run("""
a = [[1, 2], [3, 4]]
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit