From 5b797c334d3bbcbed164a9ebdb203cfad3942262 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Fri, 10 Dec 2021 11:35:29 -0500 Subject: [PATCH 1/2] rm LogExpFunctions --- Project.toml | 4 ++-- src/DiffRules.jl | 2 -- src/rules.jl | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index bf2c59a..c962cf8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DiffRules" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.5.0" +version = "1.6.0" [deps] LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" @@ -9,7 +9,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] -LogExpFunctions = "0.3" +LogExpFunctions = "0.3.2" NaNMath = "0.3" SpecialFunctions = "0.8, 0.9, 0.10, 1.0, 2" julia = "1" diff --git a/src/DiffRules.jl b/src/DiffRules.jl index e51f4d9..b70cae5 100644 --- a/src/DiffRules.jl +++ b/src/DiffRules.jl @@ -2,8 +2,6 @@ __precompile__() module DiffRules -import LogExpFunctions - include("api.jl") include("rules.jl") diff --git a/src/rules.jl b/src/rules.jl index 88cb5af..cac250b 100644 --- a/src/rules.jl +++ b/src/rules.jl @@ -256,6 +256,4 @@ end :(z = LogExpFunctions.logsubexp($x, $y); $x > $y ? -exp($y - z) : exp($y - z)) # only defined in LogExpFunctions >= 0.3.2 -if isdefined(LogExpFunctions, :xlog1py) - @define_diffrule LogExpFunctions.xlog1py(x, y) = :(log1p($y)), :($x / (1 + $y)) -end +@define_diffrule LogExpFunctions.xlog1py(x, y) = :(log1p($y)), :($x / (1 + $y)) From 95a8f928ca7c3b07d9ddcbfc4c726d3a83839d42 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Fri, 10 Dec 2021 14:36:59 -0500 Subject: [PATCH 2/2] Update src/rules.jl Co-authored-by: David Widmann --- src/rules.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rules.jl b/src/rules.jl index cac250b..d70b71e 100644 --- a/src/rules.jl +++ b/src/rules.jl @@ -255,5 +255,4 @@ end :(z = LogExpFunctions.logsubexp($x, $y); $x > $y ? exp($x - z) : -exp($x - z)), :(z = LogExpFunctions.logsubexp($x, $y); $x > $y ? -exp($y - z) : exp($y - z)) -# only defined in LogExpFunctions >= 0.3.2 @define_diffrule LogExpFunctions.xlog1py(x, y) = :(log1p($y)), :($x / (1 + $y))