For the scipy.linalg.lu () function, the permutation matrix being returned is the transpose of the correct matrix. Additionally, the code on the NumPy for Matlab users page has incorrect usage of the ...