Author: Ronan Lamy <[email protected]>
Branch: ufunc-reduce
Changeset: r78687:3f82d765fe9f
Date: 2015-07-27 20:17 +0100
http://bitbucket.org/pypy/pypy/changeset/3f82d765fe9f/
Log: another small simplification
diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -247,7 +247,7 @@
reds='auto')
-def do_accumulate(space, shape, func, arr, dtype, axis, out, identity):
+def do_accumulate(space, func, arr, dtype, axis, out, identity):
out_iter, out_state = out.create_iter()
obj_shape = arr.get_shape()
temp_shape = obj_shape[:axis] + obj_shape[axis + 1:]
@@ -258,7 +258,7 @@
arr_iter.track_index = False
if identity is not None:
identity = identity.convert_to(space, dtype)
- shapelen = len(shape)
+ shapelen = len(obj_shape)
while not out_iter.done(out_state):
accumulate_driver.jit_merge_point(shapelen=shapelen, func=func,
dtype=dtype)
diff --git a/pypy/module/micronumpy/ufuncs.py b/pypy/module/micronumpy/ufuncs.py
--- a/pypy/module/micronumpy/ufuncs.py
+++ b/pypy/module/micronumpy/ufuncs.py
@@ -322,7 +322,7 @@
if self.identity is not None:
out.fill(space, self.identity.convert_to(space, dtype))
return out
- loop.do_accumulate(space, shape, self.func, obj, dtype, axis,
+ loop.do_accumulate(space, self.func, obj, dtype, axis,
out, self.identity)
else:
if out:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit