What order do raveled values appear in? Let's start by thinking about a 2×4 array A . It looks two-dimensional, but the computer's memory is 1-dimensional: each location is identified by a single integer address. Any program that works with multi-dimensional data must therefore decide how to lay out those values.

One possibility is row-major order, which concatenates the rows. This is what C uses, and since Python was originally written in C, it uses the same convention:

In contrast, column-major order concatenates the columns. FORTRAN does this, and MATLAB follows along.

There's no real difference in performance or usability, but the differences cause headaches when data has to be moved from one programming language to another. For example, if your Python code wants to call an eigenvalue function written in FORTRAN, you will probably have to rearrange the data, just as you have to be careful about 0-based versus 1-based indexing. Note that you cannot use the array's transpose method to do this, since, as explained earlier, it doesn't actually move data around.

It's also possible that if your software is specifically tuned to operate on an array one row at a time or one column at a time it may be desireable to have the data arranged in memory so that it's accessed linearly. But this is the kind of performance tuning you won't need until and unless you know you need it. For the most part stick with row-major order (the default in Numpy) and don't worry about it.