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

Commit 12281a8

Browse files
Merge pull request #183 from JuliaDiff/inference
Better sparseAD inference
2 parents 981ff4d + 5b1ea0a commit 12281a8

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
@@ -36,7 +36,7 @@ function ForwardColorJacCache(f::F,x,_chunksize = nothing;
3636

3737
if x isa Array
3838
p = generate_chunked_partials(x,colorvec,chunksize)
39-
t = similar(x,Dual{T,eltype(x),length(first(first(p)))})
39+
t = Array{Dual{T,eltype(x),length(first(first(p)))}}(undef,size(x))
4040
for i in eachindex(t)
4141
t[i] = Dual{T,eltype(x),length(first(first(p)))}(x[i],ForwardDiff.Partials(first(p)[i]))
4242
end

0 commit comments

Comments
 (0)