5 ms·
Probably because Fortran stores matrices and other multidimensional arrays in column order. Traditionally most numerical computation software was written in For
by sdeer 2y ago
Probably because Fortran stores matrices and other multidimensional arrays in column order. Traditionally most numerical computation software was written in Fortran and numpy calls those under the hood. Storing in row order would have meant copying the data to column major order and back for any call to Fortran.
- Thrymr 2y agoNumPy can _store_ arrays in either row-major (C-style) or column-major (Fortran-style) order. Row-major is the default. Index order is always row, column.