Re: [Numpy-discussion] Syntax trouble in translating matlab code to numpy

2007-04-12 Thread Robert Kern
Oliver Siemoneit wrote: > # Transform to LMS space > LMS = numpy.zeros_like(RGB) > for i in range(RGB.shape[0]): > for j in range(RGB.shape[1]): > rgb = RGB[i,j,:2] > LMS[i,j,:2] = numpy.dot(rgb2lms, rgb) > > This code fails in the last line with the er

[Numpy-discussion] Syntax trouble in translating matlab code to numpy

2007-04-12 Thread Oliver Siemoneit
Dear numpy experts! I'm just trying to port some matlab algorithm to python which allows an image correction for color blind users. If I succeed this bit of code might be part of the MoinMoin wiki, the wikisoftware scipy.org uses (see for more on that http://moinmoin.wikiwikiweb.de/AccessibleMo