Re: [Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-20 Thread Robert Kern
On Fri, Feb 20, 2009 at 02:22, Fabrice Silva wrote: >> On Thu, Feb 19, 2009 at 17:03, Frank Peacock wrote: >> > img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2]) > > Le jeudi 19 février 2009 à 18:24 -0600, Robert Kern a écrit : >> for i in range(3): >> img[ngridn,ngride,i] = ncolour[i] >

Re: [Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-20 Thread Fabrice Silva
> On Thu, Feb 19, 2009 at 17:03, Frank Peacock wrote: > > img[ngridn,ngride]=(ncolour[0],ncolour[1],ncolour[2]) Le jeudi 19 février 2009 à 18:24 -0600, Robert Kern a écrit : > for i in range(3): > img[ngridn,ngride,i] = ncolour[i] Is it not possible to simply use img[ngridn, ngride,

[Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-19 Thread Frank Peacock
Many thanks Robert. Frank ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-19 Thread Robert Kern
On Thu, Feb 19, 2009 at 17:03, Frank Peacock wrote: > 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,ngri

[Numpy-discussion] Initialize numpy array with other numpy arrays

2009-02-19 Thread Frank Peacock
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, '