[Numpy-discussion] asarray() and PIL

cp lubensch.proletariat.inc@gmail....
Wed May 27 10:50:13 CDT 2009

> > arr=asarray(img)
> > arr.shape
> > (1600,1900,3)

> No, it means that you have 1600 rows, 1900 columns and 3 colour channels.

According to scipy documentation at
you are right.

In this case I import numpy where according to
http://www.scipy.org/Tentative_NumPy_Tutorial and the Printing Arrays paragraph
(also in http://www.scipy.org/Numpy_Example_List#reshape reshape example) the
first number is the layer, the second the rows and the last the columns.

Are all the above valid or am I missing something?


More information about the Numpy-discussion mailing list