[pypy-commit] pypy numpy NDimArray: fix iterative indexing
mattip
noreply at buildbot.pypy.org
Sun Oct 16 23:26:51 CEST 2011
Author: mattip
Branch: numpy NDimArray
Changeset: r48101:26c000b7e0f5
Date: 2011-10-16 23:07 +0200
http://bitbucket.org/pypy/pypy/changeset/26c000b7e0f5/
Log: fix iterative indexing
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
@@ -72,7 +72,7 @@
try:
i = 0
for w_elem in l:
- arr.setitem_recurse_w(space,i,0,w_elem)
+ arr.setitem_recurse_w(space,i,1,w_elem)
i += 1
except:
print_exc()
@@ -670,9 +670,10 @@
if not e.match(space, space.w_StopIteration):
raise
return
- self.setitem_recurse_w(space,i+index*self.shape[depth], depth+1, w_item)
+ self.setitem_recurse_w(space,i+index*self.shape[-depth], depth+1, w_item)
i+=1
else:
+ print 'setting',index,'to',w_value
self.setitem_w(space,index,w_value)
def setitem(self, item, value):
self.invalidated()
More information about the pypy-commit
mailing list