Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 73f2018

Browse files
fix vect indexing
1 parent ee7268c commit 73f2018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/differentiation/compute_jacobian_ad.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
307307

308308
if vect isa Array
309309
@inbounds @simd ivdep for j in eachindex(vect)
310-
vect = Dual{typeof(ForwardDiff.Tag(f,eltype(vecx)))}(vecx[j], partial_i[j])
310+
vect[j] = Dual{typeof(ForwardDiff.Tag(f,eltype(vecx)))}(vecx[j], partial_i[j])
311311
end
312312
else
313313
vect .= Dual{typeof(ForwardDiff.Tag(f,eltype(vecx)))}.(vecx, partial_i)

0 commit comments

Comments
 (0)