[pypy-issue] [issue959] numpypy array operation improperly jitted away

mikefc tracker at bugs.pypy.org
Sun Dec 11 09:15:19 CET 2011

New submission from mikefc <coolbutuseless at gmail.com>:

* with pypy jit, array values get left at [0,0,0] instead of set to [128, 128, 128]  (at 
about the 2000th iteration)
* succeeds with CPython and pypy --jit off

Running latest nightly for osx (94737f156c30).
import platform; 
if platform.python_implementation()=='CPython':
	import numpy
	# pypy
	import numpypy as numpy

nch = 3
rows = 128 
cols = 128
data = numpy.zeros([rows, cols, nch], dtype='int32')

rawdata = [128 for i in range(rows*cols*nch)]

for i,colour in enumerate(zip(*[rawdata[i::nch] for i in range(nch)])):
	row = i / cols
	col = i % cols
	data[row,col,:] = colour
	print i, row, col, colour, data[row,col,:]

messages: 3560
nosy: mikefc, pypy-issue
priority: bug
release: ???
status: unread
title: numpypy array operation improperly jitted away

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list