File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ function finite_difference_jacobian(
192192 return dx
193193 end
194194
195- if jac_prototype isa Nothing
195+ if jac_prototype isa Nothing && sparsity isa Nothing
196196 J = mapreduce (calculate_Ji_forward, hcat, 1 : maximum (colorvec))
197197 else
198198 @inbounds for color_i ∈ 1 : maximum (colorvec)
@@ -227,7 +227,7 @@ function finite_difference_jacobian(
227227 return dx
228228 end
229229
230- if jac_prototype isa Nothing
230+ if jac_prototype isa Nothing && sparsity isa Nothing
231231 J = mapreduce (calculate_Ji_central, hcat, 1 : maximum (colorvec))
232232 else
233233 @inbounds for color_i ∈ 1 : maximum (colorvec)
@@ -261,7 +261,7 @@ function finite_difference_jacobian(
261261 return dx
262262 end
263263
264- if jac_prototype isa Nothing
264+ if jac_prototype isa Nothing && sparsity isa Nothing
265265 J = mapreduce (calculate_Ji_complex, hcat, 1 : maximum (colorvec))
266266 else
267267 @inbounds for color_i ∈ 1 : maximum (colorvec)
You can’t perform that action at this time.
0 commit comments