Skip to content

Commit

Permalink
Set default rows_index and cols_index to nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Oct 7, 2024
1 parent a984510 commit de5bc26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/differentiation/compute_jacobian_ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
if FiniteDiff._use_findstructralnz(sparsity)
rows_index, cols_index = ArrayInterface.findstructralnz(sparsity)
else
rows_index = 1:size(J, 1)
cols_index = 1:size(J, 2)
rows_index = nothing
cols_index = nothing
end

# fast path if J and sparsity are both AbstractSparseMatrix and have the same sparsity pattern
Expand Down

0 comments on commit de5bc26

Please sign in to comment.