[Numpy-discussion] arrays are column-wise or row-wise?

Francesc Altet faltet at carabos.com
Tue Mar 28 07:19:25 EST 2006


A Dimarts 28 Març 2006 15:59, Brian Blais va escriure:
> Hello,
>
> I thought I had read somewhere that the values in a numpy contiguous array
> are stored column-wise (moving down from the upper left to the lower left
> first) like C as opposed to row-wise (moving right from the upper left to
> the upper right first). However, when I write a simply Pyrex function to
> access the data pointer and print it out, it seems to go across the row. 
> Is this correct?

Nope. C arrangement of values is row-wise and Fortran is column-wise.
You are seeing row-wise ordering, so everything behaves as it should.

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"





More information about the NumPy-Discussion mailing list