Skip to content

Commit

Permalink
a bit more edits to unit 10
Browse files Browse the repository at this point in the history
  • Loading branch information
paciorek committed Nov 2, 2023
1 parent ffc07b0 commit e71d847
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions _freeze/units/unit10-linalg/execute-results/html.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _freeze/units/unit10-linalg/execute-results/tex.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions units/unit10-linalg.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -1009,14 +1009,14 @@ diagonals to be positive). One algorithm for computing $U$ is:

We can then solve a system of equations as: $U^{-1}(U^{\top-1}b)$.

Confusingly, while numpy's `cholesky` gives $L = U^\top$, scipy
can return either $L$ or $U$ but defaults to $U$.
Confusingly, while numpy's `cholesky` gives $L = U^\top$, scipy's
`choleskey` can return either $L$ or $U$ but defaults to $U$.

Here are two ways we can use the Cholesky to solve a system of equations:

```{python, eval=FALSE}
U = sp.linalg.cholesky(A)
sp.linalg.solve_triangular(L.T,
sp.linalg.solve_triangular(U,
sp.linalg.solve_triangular(U, b, lower=False, trans='T'),
lower=False)
Expand Down

0 comments on commit e71d847

Please sign in to comment.