Skip to content

Commit

Permalink
similar doesn't preserve the sparsity pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 6, 2023
1 parent 04810f5 commit b71300d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SparseDiffTools"
uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
authors = ["Pankaj Mishra <[email protected]>", "Chris Rackauckas <[email protected]>"]
version = "2.7.0"
version = "2.8.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
1 change: 1 addition & 0 deletions src/highlevel/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ function init_jacobian(c::AbstractMaybeSparseJacobianCache)
end
init_jacobian(::Nothing, ::Type{T}, fx, x) where {T} = similar(fx, T, length(fx), length(x))
init_jacobian(J, ::Type{T}, _, _) where {T} = similar(J, T, size(J, 1), size(J, 2))
init_jacobian(J::SparseMatrixCSC, ::Type{T}, _, _) where {T} = T.(J)

Check warning on line 263 in src/highlevel/common.jl

View check run for this annotation

Codecov / codecov/patch

src/highlevel/common.jl#L263

Added line #L263 was not covered by tests

__maybe_copy_x(_, x) = x
__maybe_copy_x(_, ::Nothing) = nothing

0 comments on commit b71300d

Please sign in to comment.