diff --git a/README.md b/README.md index 16eb49df..a72097a3 100644 --- a/README.md +++ b/README.md @@ -43,18 +43,17 @@ end For this function, we know that the sparsity pattern of the Jacobian is a `Tridiagonal` matrix. However, if we didn't know the sparsity pattern for -the Jacobian, we could use the `jacobian_sparsity` function to automatically -detect the sparsity pattern. This function is only available if you -load SparsityDetection.jl as well. We declare that the function `f` outputs a -vector of length 30 and takes in a vector of length 30, and `jacobian_sparsity` spits -out a `Sparsity` object which we can turn into a `SparseMatrixCSC`: +the Jacobian, we could use the `Symbolics.jacobian_sparsity` function to automatically +detect the sparsity pattern. We declare that the function `f` outputs a +vector of length 30 and takes in a vector of length 30, and `jacobian_sparsity` returns +a `SparseMatrixCSC`: ```julia -using Symbolics, SparseArrays +using Symbolics input = rand(30) output = similar(input) sparsity_pattern = Symbolics.jacobian_sparsity(f,output,input) -jac = Float64.(sparse(sparsity_pattern)) +jac = Float64.(sparsity_pattern) ``` Now we call `matrix_colors` to get the colorvec vector for that matrix: