Skip to content

Commit 3cc8af7

Browse files
Change eltype of hess_prototype coming from mtk from bool to parameter eltype
1 parent 3f80add commit 3cc8af7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/function/mtk.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function instantiate_function(f, x, adtype::AutoModelingToolkit, p, num_cons = 0
2323
hess = (H, θ, args...) -> f.hess(H, θ, p, args...)
2424

2525
hv = function (H, θ, v, args...)
26-
res = adtype.obj_sparse ? hess_prototype : ArrayInterfaceCore.zeromatrix(θ)
26+
res = adtype.obj_sparse ? (eltype(θ)).(f.hess_prototype) : ArrayInterfaceCore.zeromatrix(θ)
2727
hess(res, θ, args...)
2828
H .= res * v
2929
end

0 commit comments

Comments
 (0)