[pypy-commit] pypy default: Attempt to fix obscure translation error, don't make the annotator unify the 2 size fields.

alex_gaynor noreply at buildbot.pypy.org
Fri Jun 17 00:00:32 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r44979:ffb24c7486cf
Date: 2011-06-16 15:03 -0700
http://bitbucket.org/pypy/pypy/changeset/ffb24c7486cf/

Log:	Attempt to fix obscure translation error, don't make the annotator
	unify the 2 size fields.

diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -102,9 +102,10 @@
     def descr_mean(self, space):
         s = 0
         concrete = self.get_concrete()
-        for i in xrange(concrete.size):
+        size = concrete.find_size()
+        for i in xrange(size):
             s += concrete.getitem(i)
-        return space.wrap(s / concrete.size)
+        return space.wrap(s / size)
 
 
 class FloatWrapper(BaseArray):


More information about the pypy-commit mailing list