|
34 | 34 |
|
35 | 35 | @testset "single element" begin
|
36 | 36 | test_rrule(getindex, x, 2)
|
37 |
| - test_rrule(getindex, x, 2, 1) |
38 |
| - test_rrule(getindex, x, 2, 2) |
| 37 | + test_rrule(getindex, x, 2, 1; check_inferred=false) |
| 38 | + test_rrule(getindex, x, 2, 2; check_inferred=false) |
39 | 39 |
|
40 |
| - test_rrule(getindex, x, CartesianIndex(2, 3)) |
| 40 | + test_rrule(getindex, x, CartesianIndex(2, 3); check_inferred=false) |
41 | 41 | end
|
42 | 42 |
|
43 | 43 | @testset "slice/index positions" begin
|
|
87 | 87 | dgrad = rrule(getindex, Diagonal(rand(3)), 2, :)[2]([1,2,3])[2]
|
88 | 88 | @test unthunk(dgrad) ≈ Diagonal([0, 2, 0])
|
89 | 89 |
|
90 |
| - test_rrule(getindex, Symmetric(rand(3, 3)), 2, 2) |
| 90 | + test_rrule(getindex, Symmetric(rand(3, 3)), 2, 2; check_inferred=false) # Infers to Any |
91 | 91 | sgrad = rrule(getindex, Symmetric(rand(3, 3)), 2, 3)[2](1.0)[2]
|
92 |
| - @test unthunk(sgrad) ≈ [0 0 0; 0 0 1/2; 0 1/2 0] # We are actually getting this wrong now |
| 92 | + @test unthunk(sgrad) ≈ [0 0 0; 0 0 1/2; 0 1/2 0] |
93 | 93 | end
|
94 | 94 |
|
95 | 95 | @testset "getindex(::Array{<:Array})" begin
|
|
0 commit comments