Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "1.74.4"
version = "1.74.5"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
1 change: 1 addition & 0 deletions src/rulesets/Base/nondiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
@non_differentiable sum(::AbstractArray{Bool})
@non_differentiable sum(::Any, ::AbstractArray{Bool})
@non_differentiable sum(::typeof(abs2), ::AbstractArray{Bool}) # avoids an ambiguity
@non_differentiable sum(::NTuple{<:Any,Bool})
@non_differentiable vcat(::AbstractArray{Bool}...)
@non_differentiable vec(::AbstractArray{Bool})
@non_differentiable Vector(::AbstractArray{Bool})
Expand Down
3 changes: 3 additions & 0 deletions test/rulesets/Base/mapreduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ struct SumRuleConfig <: RuleConfig{Union{HasReverseMode}} end
test_rrule(sum, Tuple(rand(5)))
test_rrule(sum, (1.2, 3.4 + 5im))
test_rrule(sum, (rand(2)', rand(1,2)))

# Boolean -- via @non_differentiable
test_rrule(sum, (true, false, true))
end
@testset "sum(x; dims=$dims)" for dims in (:, 2, (1,3))
# Forward
Expand Down
Loading