My goal is to transform a matrix into upper triangular form in Python. I know the function scipy.linalg.lu will do LU decomposition and get both upper and lower triangular ones. I need to repeat this procedure several times. If there is functions from Scipy, blas, or lapack that compute only upper triangular matrix, the performance of my algorithm will be improved significantly.
Could you please suggest such functions? Thank you so much!
A, I can get bothU, LbyU, L = scipy.linalg.lu(A)[1: 3]. I can getUbyU = scipy.linalg.lu(A)[2]. Even I use the latter, i.e.U = scipy.linalg.lu(A)[2], the functionscipy.linalg.lustill computesL, which is unnecessary for me and takes more time. I meant to looking for a function that only computesU. $\endgroup$