Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BioTurboNick committed Sep 16, 2024
1 parent 940d63f commit 4175924
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/rulesets/Base/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ end
@test back([1:3, ZeroTangent(), 7:9, NoTangent()])[2] isa Matrix{Float64}
@test back([ZeroTangent(), ZeroTangent(), NoTangent(), NoTangent()]) == (NoTangent(), [0 0 0 0; 0 0 0 0; 0 0 0 0])

_, back = ChainRules.rrule(eachslice, FooTwoField.(rand(2, 3, 2), rand(2, 3, 2)); dims = 3)
_, back = ChainRules.rrule(
eachslice, FooTwoField.(rand(2, 3, 2), rand(2, 3, 2)); dims = 3
)
@test back([fill(Tangent{Any}(; x = 0.0, y = 1.0), 2, 3), fill(ZeroTangent(), 2, 3)]) == (
NoTangent(), [fill(Tangent{Any}(; x = 0.0, y = 1.0), 2, 3);;; fill(ZeroTangent(), 2, 3)]
)
Expand Down

0 comments on commit 4175924

Please sign in to comment.