Skip to content

Commit 4944ad1

Browse files
skip overflow
1 parent b25c7da commit 4944ad1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/differentiation/compute_jacobian_ad.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
114114
else
115115
for j in 1:chunksize
116116
col_index = (i-1)*chunksize + j
117+
(col_index > maximum(color)) && continue
117118
J[:, col_index] .= partials.(fx, j)
118119
end
119120
end

0 commit comments

Comments
 (0)