3636 @test_throws DimensionMismatch ArrayInterface. from_parent_dims (typeof (vadj), 0 )
3737 @test_throws DimensionMismatch ArrayInterface. from_parent_dims (typeof (vadj), static (0 ))
3838
39- if VERSION ≥ v " 1.6.0-DEV.1581"
40- colormat = reinterpret (reshape, Float64, [(R= rand (), G= rand (), B= rand ()) for i ∈ 1 : 100 ])
41- @test @inferred (ArrayInterface. from_parent_dims (typeof (colormat))) === (static (2 ),)
42- @test @inferred (ArrayInterface. to_parent_dims (typeof (colormat))) === (static (0 ), static (1 ),)
43-
44- Rr = reinterpret (reshape, Int32, ones (4 ))
45- @test @inferred (ArrayInterface. from_parent_dims (typeof (Rr))) === (static (2 ),)
46- @test @inferred (ArrayInterface. to_parent_dims (typeof (Rr))) === (static (0 ), static (1 ),)
47-
48- Rr = reinterpret (reshape, Int64, ones (4 ))
49- @test @inferred (ArrayInterface. from_parent_dims (typeof (Rr))) === (static (1 ),)
50- @test @inferred (ArrayInterface. to_parent_dims (typeof (Rr))) === (static (1 ),)
51-
52- Sr = reinterpret (reshape, Complex{Int64}, zeros (2 , 3 , 4 ))
53- @test @inferred (ArrayInterface. from_parent_dims (typeof (Sr))) === (static (0 ), static (1 ), static (2 ))
54- @test @inferred (ArrayInterface. to_parent_dims (typeof (Sr))) === (static (2 ), static (3 ))
55- end
39+ colormat = reinterpret (reshape, Float64, [(R= rand (), G= rand (), B= rand ()) for i ∈ 1 : 100 ])
40+ @test @inferred (ArrayInterface. from_parent_dims (typeof (colormat))) === (static (2 ),)
41+ @test @inferred (ArrayInterface. to_parent_dims (typeof (colormat))) === (static (0 ), static (1 ),)
42+
43+ Rr = reinterpret (reshape, Int32, ones (4 ))
44+ @test @inferred (ArrayInterface. from_parent_dims (typeof (Rr))) === (static (2 ),)
45+ @test @inferred (ArrayInterface. to_parent_dims (typeof (Rr))) === (static (0 ), static (1 ),)
46+
47+ Rr = reinterpret (reshape, Int64, ones (4 ))
48+ @test @inferred (ArrayInterface. from_parent_dims (typeof (Rr))) === (static (1 ),)
49+ @test @inferred (ArrayInterface. to_parent_dims (typeof (Rr))) === (static (1 ),)
50+
51+ Sr = reinterpret (reshape, Complex{Int64}, zeros (2 , 3 , 4 ))
52+ @test @inferred (ArrayInterface. from_parent_dims (typeof (Sr))) === (static (0 ), static (1 ), static (2 ))
53+ @test @inferred (ArrayInterface. to_parent_dims (typeof (Sr))) === (static (2 ), static (3 ))
5654end
5755
5856@testset " order_named_inds" begin
139137 x[x= 1 ] = [2 , 3 ]
140138 @test @inferred (getindex (x, x= 1 )) == [2 , 3 ]
141139 y = NamedDimsWrapper ((:x , static (:y )), ones (2 , 2 ))
142- # FIXME this doesn't correctly infer the output because it can't infer
140+ # FIXME this doesn't correctly infer the output because it can't infer
143141 @test getindex (y, x= 1 ) == [1 , 1 ]
144142end
145143
165163 @test @inferred (ArrayInterface. dense_dims (u_view)) == (False (),)
166164 @test @inferred (ArrayInterface. dense_dims (u_reshaped_view1)) == (False (), False ())
167165 @test @inferred (ArrayInterface. dense_dims (u_reshaped_view2)) == (False (), False ())
168- end
166+ end
0 commit comments