Skip to content

Commit 1b28f0c

Browse files
mzgubicoxinabox
andauthored
Apply suggestions from code review
Co-authored-by: Lyndon White <[email protected]>
1 parent 440591e commit 1b28f0c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/rulesets/Base/mapreduce.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
sizes = (3, 4, 7)
44
@testset "dims = $dims" for dims in (:, 1)
55
@testset "Array{$N, $T}" for N in eachindex(sizes), T in (Float64, ComplexF64)
6-
s = sizes[1:N]
7-
x = randn(T, s...)
6+
x = randn(T, sizes[1:N]...)
87
test_frule(sum, x; fkwargs=(;dims=dims))
98
test_rrule(sum, x; fkwargs=(;dims=dims))
109
end
@@ -15,8 +14,7 @@
1514
sizes = (3, 4, 7)
1615
@testset "dims = $dims" for dims in (:, 1)
1716
@testset "Array{$N, $T}" for N in eachindex(sizes), T in (Float64, ComplexF64)
18-
s = sizes[1:N]
19-
x = randn(T, s...)
17+
x = randn(T, sizes[1:N]...)
2018
test_frule(sum, abs2, x; fkwargs=(;dims=dims))
2119
test_rrule(sum, abs2 nothing, x; fkwargs=(;dims=dims))
2220
end

0 commit comments

Comments
 (0)