# [PYTHON MATRIX-SIG] linear algebra

**Doug Heisterkamp
**
drh@cherokee.unl.edu

*Mon, 19 Aug 1996 13:39:12 -0500 (CDT)*

>* All of the current interface routines (from LinAlg.py) do the following:
*>*
*>* return transpose(lapackfunction(transpose(input_matrix)))
*>*
*>* Should these two transpositions be there? This is obviously related to
*>* the different index order between NumPy and FORTRAN. Still, I've always
*>* personally considered it a superficial difference that is best ignored.
*>*
*>* If I remember by Linear Algebra correctly
*>* transpose(inverse(transpose(m))) == inverse(m).
*>*
*
For functions like inverse and eigenvalues, the transpose is not needed.
To skip the transpose for other functions is really just pushing the
transpose back to when the user is placing data in the matrix. This
would probably cause to much confusion in a standard library.
I have a version of LinAlg.py in which I do not transpose the matrices.
That version does not even copy the matrices. I just catch the
exception when the array is not contiguous and then copy it. When
I use that version, I know the data should be contiguous and is all
ready stored for Fortran use.
Doug Heisterkamp
drh@cherokee.unl.edu
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================