Skip to content

Commit c0c3955

Browse files
committed
get rid of the type weirdness, add a warning for using chunksize kwarg
1 parent a24771c commit c0c3955

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/OrdinaryDiffEqCore/src/misc_utils.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,7 @@ end
140140

141141
function _bool_to_ADType(::Val{false}, chunksize, diff_type)
142142
Base.depwarn("Using a `Bool` for keyword argument `autodiff` is deprecated. Please use an `ADType` specifier.", :_bool_to_ADType)
143-
if diff_type isa Type
144-
return AutoFiniteDiff(fdtype = diff_type())
145-
else
146-
return AutoFiniteDiff(fdtype = diff_type)
147-
end
143+
return AutoFiniteDiff(fdtype = diff_type())
148144
end
149145

150146
# Functions to get ADType type from Bool or ADType object, or ADType type
@@ -153,6 +149,7 @@ _process_AD_choice(ad_alg::Bool, chunksize, diff_type) = _bool_to_ADType(Val(ad_
153149
function _process_AD_choice(ad_alg::AbstractADType, chunksize, diff_type)
154150
# need a path for if just chunksize is specified in the Algorithm construction
155151
if !(chunksize === Val{0}())
152+
@warn "The `chunksize` keyword is deprecated. Please use an `ADType` specifier. For now defaulting to using `ForwardDiff` with the given `chunksize`."
156153
return _bool_to_ADType(Val{true}(), chunksize, diff_type)
157154
end
158155

0 commit comments

Comments
 (0)