Skip to content

Commit afaeea7

Browse files
Update README.md
1 parent 456517a commit afaeea7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ end
4343

4444
For this function, we know that the sparsity pattern of the Jacobian is a
4545
`Tridiagonal` matrix. However, if we didn't know the sparsity pattern for
46-
the Jacobian, we could use the `sparsity!` function to automatically
46+
the Jacobian, we could use the `jacobian_sparsity` function to automatically
4747
detect the sparsity pattern. This function is only available if you
4848
load SparsityDetection.jl as well. We declare that the function `f` outputs a
49-
vector of length 30 and takes in a vector of length 30, and `sparsity!` spits
49+
vector of length 30 and takes in a vector of length 30, and `jacobian_sparsity` spits
5050
out a `Sparsity` object which we can turn into a `SparseMatrixCSC`:
5151

5252
```julia
5353
using SparsityDetection, SparseArrays
5454
input = rand(30)
5555
output = similar(input)
56-
sparsity_pattern = sparsity!(f,output,input)
56+
sparsity_pattern = jacobian_sparsity(f,output,input)
5757
jac = Float64.(sparse(sparsity_pattern))
5858
```
5959

0 commit comments

Comments
 (0)