Skip to content

Commit 15f644c

Browse files
author
Miha Zgubic
committed
clean up
1 parent ae314c4 commit 15f644c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/rulesets/Base/arraymath.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,30 @@
3434
end
3535

3636
@testset "SubArray - $indexname" for (indexname, m_index) in (
37-
("fast", :), ("slow", Ref(m:-1:1))
37+
("fast", :), ("slow", m:-1:1)
3838
)
3939
test_rrule(*, view(nm, :, m_index), view(mp, m_index, :))
4040
test_rrule(*, nm, view(mp, m_index, :))
4141
test_rrule(*, view(nm, :, m_index), mp)
4242
end
4343

4444
@testset "Adjoints and Transposes" begin
45-
test_rrule(*, Transpose(mn), Transpose(pm))
46-
test_rrule(*, Adjoint(mn), Adjoint(pm))
45+
test_rrule(*, Transpose(mn) Transpose(mn), Transpose(pm) Transpose(pm))
46+
test_rrule(*, Adjoint(mn) Adjoint(mn), Adjoint(pm) Adjoint(pm))
4747

48-
test_rrule(*, Transpose(mn), (mp))
49-
test_rrule(*, Adjoint(mn), (mp))
48+
test_rrule(*, Transpose(mn) Transpose(mn), (mp))
49+
test_rrule(*, Adjoint(mn) Adjoint(mn), (mp))
5050

51-
test_rrule(*, (nm), Transpose(pm))
52-
test_rrule(*, (nm), Adjoint(pm))
51+
test_rrule(*, (nm), Transpose(pm) Transpose(pm))
52+
test_rrule(*, (nm), Adjoint(pm) Adjoint(pm))
5353
end
5454
end
5555
end
5656

5757
@testset "Covector * Vector n=$n" for n in (3, 5)
5858
@testset "$f" for f in (adjoint, transpose)
5959
# This should be same as dot product and give a scalar
60-
test_rrule(*, f((n)), (n))
60+
test_rrule(*, f((n)) f((n)), (n))
6161
end
6262
end
6363
end
@@ -85,7 +85,7 @@
8585
@testset "Vector $f Matrix" begin
8686
x = randn(10)
8787
Y = randn(10, 4)
88-
test_rrule(f, x, Y)
88+
test_rrule(f, x, Y; output_tangent=Transpose(rand(4)))
8989
end
9090
end
9191
end

0 commit comments

Comments
 (0)