Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 2
    $\begingroup$ Do I understand you correctly: you want to get only $U$ from $A=LU$ factorization, while $L$ is discarded? $\endgroup$ Commented Jun 7, 2020 at 1:09
  • $\begingroup$ Hi @AntonMenshov, for a matrix A, I can get both U, L by U, L = scipy.linalg.lu(A)[1: 3]. I can get U by U = scipy.linalg.lu(A)[2]. Even I use the latter, i.e. U = scipy.linalg.lu(A)[2], the function scipy.linalg.lu still computes L, which is unnecessary for me and takes more time. I meant to looking for a function that only computes U. $\endgroup$ Commented Jun 7, 2020 at 6:55