From 531145cd68e7cbd1ce351935d85c6a59df5752af Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Fri, 24 Jan 2025 07:32:02 +0100 Subject: [PATCH] fix: add type annotation to step parameters in AutoFiniteDiff (#104) --- Project.toml | 2 +- src/dense.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index b65a756..6425188 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ADTypes" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" authors = ["Vaibhav Dixit , Guillaume Dalle and contributors"] -version = "1.12.0" +version = "1.12.1" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" diff --git a/src/dense.jl b/src/dense.jl index bbc327e..ead6936 100644 --- a/src/dense.jl +++ b/src/dense.jl @@ -116,12 +116,12 @@ Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl). - `relstep`: relative finite difference step size - `absstep`: absolute finite difference step size """ -Base.@kwdef struct AutoFiniteDiff{T1, T2, T3} <: AbstractADType +Base.@kwdef struct AutoFiniteDiff{T1, T2, T3, S1, S2} <: AbstractADType fdtype::T1 = Val(:forward) fdjtype::T2 = fdtype fdhtype::T3 = Val(:hcentral) - relstep = nothing - absstep = nothing + relstep::S1 = nothing + absstep::S2 = nothing end mode(::AutoFiniteDiff) = ForwardMode()