Skip to content

Commit ca2220f

Browse files
committed
Handle the cases where c!(cx, x) doesn't return cx
1 parent 5d917ce commit ca2220f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sparsity_pattern.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ function compute_hessian_sparsity(
4545
else
4646
cx = zeros(eltype(x), ncon)
4747
y0 = rand(ncon)
48-
return f(x) + dot(c!(cx, x), y0)
48+
c!(cx, x)
49+
return f(x) + dot(cx, y0)
4950
end
5051
end
5152

0 commit comments

Comments
 (0)