@@ -18,3 +18,21 @@ x = Tracker.TrackedArray([4.0,4.0])
1818x = reduce (vcat, Tracker. TrackedArray ([4.0 ,4.0 ]))
1919x = [x[1 ],x[2 ]]
2020@test ArrayInterface. aos_to_soa (x) isa Tracker. TrackedArray
21+
22+ x = rand (4 )
23+ y = Tracker. TrackedReal .(rand (2 ,2 ))
24+ @test ArrayInterface. restructure (x, y) isa Array
25+ @test eltype (ArrayInterface. restructure (x, y)) <: Tracker.TrackedReal
26+ @test size (ArrayInterface. restructure (x, y)) == (4 ,)
27+ y = Tracker. TrackedArray (rand (2 ,2 ))
28+ @test ArrayInterface. restructure (x, y) isa Tracker. TrackedArray
29+ @test size (ArrayInterface. restructure (x, y)) == (4 ,)
30+
31+ x = rand (4 )
32+ y = ReverseDiff. track (rand (2 ,2 ))
33+ @test ArrayInterface. restructure (x, y) isa ReverseDiff. TrackedArray
34+ @test size (ArrayInterface. restructure (x, y)) == (4 ,)
35+ y = ReverseDiff. track .(rand (2 ,2 ))
36+ @test ArrayInterface. restructure (x, y) isa Array
37+ @test eltype (ArrayInterface. restructure (x, y)) <: ReverseDiff.TrackedReal
38+ @test size (ArrayInterface. restructure (x, y)) == (4 ,)
0 commit comments