diff --git a/Project.toml b/Project.toml index dd836c7d..308f4663 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SparseDiffTools" uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" authors = ["Pankaj Mishra ", "Chris Rackauckas "] -version = "1.1.0" +version = "1.1.1" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/differentiation/compute_jacobian_ad.jl b/src/differentiation/compute_jacobian_ad.jl index 29b167b6..7c9d36c6 100644 --- a/src/differentiation/compute_jacobian_ad.jl +++ b/src/differentiation/compute_jacobian_ad.jl @@ -31,7 +31,7 @@ function ForwardColorJacCache(f,x,_chunksize = nothing; end p = adapt.(typeof(x),generate_chunked_partials(x,colorvec,chunksize)) - t = reshape(Dual{typeof(f)}.(vec(x),first(p)),size(x)...) + t = reshape(Dual{ForwardDiff.Tag(f,eltype(vec(x)))}.(vec(x),first(p)),size(x)...) if dx isa Nothing fx = similar(t) @@ -43,7 +43,7 @@ function ForwardColorJacCache(f,x,_chunksize = nothing; else pi = pi[1:length(dx)] end - fx = reshape(Dual{typeof(f)}.(vec(dx),pi),size(dx)...) + fx = reshape(Dual{ForwardDiff.Tag(f,eltype(vec(x)))}.(vec(dx),pi),size(dx)...) _dx = dx end @@ -99,7 +99,7 @@ function forwarddiff_color_jacobian(f,x::AbstractArray{<:Number},jac_cache::Forw for i in eachindex(p) partial_i = p[i] - t = reshape(Dual{typeof(f)}.(vecx, partial_i),size(t)) + t = reshape(Dual{ForwardDiff.Tag(f,eltype(vecx))}.(vecx, partial_i),size(t)) fx = f(t) if !(sparsity isa Nothing) for j in 1:chunksize @@ -169,7 +169,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number}, for i in eachindex(p) partial_i = p[i] - vect .= Dual{typeof(f)}.(vecx, partial_i) + vect .= Dual{ForwardDiff.Tag(f,eltype(vecx))}.(vecx, partial_i) f(fx,t) if !(sparsity isa Nothing) for j in 1:chunksize