Skip to content

Commit e9d7d0a

Browse files
authored
make ∇eachslice accept AbstractZero (#639)
* make ∇eachslice accept Zero * bump
1 parent d68adfb commit e9d7d0a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRules"
22
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "1.36.1"
3+
version = "1.36.2"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/rulesets/Base/indexing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function ∇eachslice(dys_raw, x::AbstractArray, vd::Val{dim}) where {dim}
9393
end
9494
return ProjectTo(x)(dx)
9595
end
96+
∇eachslice(dys::AbstractZero, x::AbstractArray, vd::Val{dim}) where {dim} = dys
9697

9798
_zero_fill!(dx::AbstractArray{<:Number}) = fill!(dx, zero(eltype(dx)))
9899
_zero_fill!(dx::AbstractArray) = map!(zero, dx, dx)

0 commit comments

Comments
 (0)