We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4b816b commit 62fb637Copy full SHA for 62fb637
src/highlevel/common.jl
@@ -241,10 +241,10 @@ const __init_𝒥 = init_jacobian
241
242
# Misc Functions
243
function __chunksize(::AutoSparseForwardDiff{C}, x) where {C}
244
- return C === nothing ? ForwardDiff.Chunk(x) : C
+ return C === nothing ? ForwardDiff.Chunk(x) : (C isa Number ? ForwardDiff.Chunk{C}() : C)
245
end
246
__chunksize(::AutoSparseForwardDiff{C}) where {C} = C
247
-__chunksize(::AutoForwardDiff{C}, x) where {C} = C === nothing ? ForwardDiff.Chunk(x) : C
+__chunksize(::AutoForwardDiff{C}, x) where {C} = C === nothing ? ForwardDiff.Chunk(x) : (C isa Number ? ForwardDiff.Chunk{C}() : C)
248
__chunksize(::AutoForwardDiff{C}) where {C} = C
249
250
__f̂(f, x, idxs) = dot(vec(f(x)), idxs)
0 commit comments