Hello
I would like to know whether I can do the following in some other way as this fails with setting an array with a sequence on each of the colour arrays: h,w=720,410 img = ones((h,w,3), uint8)*255 img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2]) pilImage = Image.fromarray(img, 'RGB') where ngridn,ngride,ncolour[m] are all 1-D with the same dimension (effectively ngridn and ngride values map within the bounds of the image) The following works fine: h,w=720,410 img = ones((h,w,3), uint8)*255 img[ngridn,ngride]=(255,0,0) pilImage = Image.fromarray(img, 'RGB') I would prefer not to use indices to solve the problem like the following: (as it is a lot slower) h,w=720,410 img = ones((h,w,3), uint8)*255 for n in range(len(gride)): img[ngridn[n],ngride[n]]=(ncolour[0][n],ncolour[1][n],ncolour[n][2]) pilImage = Image.fromarray(img, 'RGB') It is possible to not use indices and use numpy functions instead. Thanks Frank
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion