diff --git a/Project.toml b/Project.toml index d94ce7a3d..715ebe800 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ChainRules" uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.52.1" +version = "1.53.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/rulesets/Base/base.jl b/src/rulesets/Base/base.jl index aa9489e52..9576abd98 100644 --- a/src/rulesets/Base/base.jl +++ b/src/rulesets/Base/base.jl @@ -3,8 +3,8 @@ @scalar_rule copysign(y, x) (ifelse(signbit(x)!=signbit(y), -one(y), +one(y)), NoTangent()) -@scalar_rule one(x) zero(x) -@scalar_rule zero(x) zero(x) +@scalar_rule one(x) ZeroTangent() +@scalar_rule zero(x) ZeroTangent() @scalar_rule transpose(x) true # `adjoint`