Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
BioTurboNick committed Sep 16, 2024
1 parent 948f7aa commit b65fde2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/rulesets/Base/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,8 @@ end

if VERSION >= v"1.7"
# On 1.6, ComposedFunction doesn't take keywords. Only affects this testing strategy, not real use.
test_rrule(
collect eachslice, rand(3, 4, 5); fkwargs=(; dims=3)
)
test_rrule(
collect eachslice, rand(3, 4, 5); fkwargs=(; dims=(2,))
)
test_rrule(collect eachslice, rand(3, 4, 5); fkwargs=(; dims=3))
test_rrule(collect eachslice, rand(3, 4, 5); fkwargs=(; dims=(2,)))

test_rrule(
collect eachslice,
Expand All @@ -250,7 +246,8 @@ end
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(), cat(fill(Tangent{Any}(; x=0.0, y=1.0), 2, 3), fill(ZeroTangent(), 2, 3), dims = 3)
NoTangent(),
cat(fill(Tangent{Any}(; x=0.0, y=1.0), 2, 3), fill(ZeroTangent(), 2, 3); dims=3)
)

# Second derivative rule
Expand Down

0 comments on commit b65fde2

Please sign in to comment.