Almar Klein wrote:
Hi,

I was wondering...

Say we have a np.ndarray A of two dimensions (a grayscale image for example). If we want to access x:2, y:3, we have to do A[3,2]. Why is the order of x and y reversed?

Because images are stored by rows, not by columns. So column 3, row 2, is row 2, column 3. The same convention is used for matrix coordinates.
Numpy has no idea what names you apply to the dimensions.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to