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

Fabrice Silva silva@lma.cnrs-mrs...
Fri Feb 20 02:22:08 CST 2009


> On Thu, Feb 19, 2009 at 17:03, Frank Peacock <frank@gis4weather.com> 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, :] = ncolour[:]

-- 
Fabricio




More information about the Numpy-discussion mailing list