@@ -468,10 +468,10 @@ end
468
468
M = @MArray zeros (2 ,3 ,4 ); Mp = @view (PermutedDimsArray (M,(3 ,1 ,2 ))[:,2 ,:])' ;
469
469
Sp2 = @view (PermutedDimsArray (S,(3 ,2 ,1 ))[2 : 3 ,:,:]);
470
470
Mp2 = @view (PermutedDimsArray (M,(3 ,1 ,2 ))[2 : 3 ,:,2 ])' ;
471
- D = @view (A[:,2 : 2 : 4 ,:])
472
- R = StaticInt (1 ): StaticInt (2 )
473
- Rnr = reinterpret (Int32, R)
474
- Ar = reinterpret (Float32, A)
471
+ D = @view (A[:,2 : 2 : 4 ,:]);
472
+ R = StaticInt (1 ): StaticInt (2 );
473
+ Rnr = reinterpret (Int32, R);
474
+ Ar = reinterpret (Float32, A);
475
475
476
476
sv5 = @SVector (zeros (5 )); v5 = Vector {Float64} (undef, 5 );
477
477
@test @inferred (ArrayInterface. size (sv5)) === (StaticInt (5 ),)
@@ -611,15 +611,25 @@ end
611
611
612
612
colormat = reinterpret (reshape, Float64, colors)
613
613
@test @inferred (ArrayInterface. strides (colormat)) === (StaticInt (1 ), StaticInt (3 ))
614
-
614
+ @test @inferred (ArrayInterface. dense_dims (colormat)) === (True (),True ())
615
+ @test @inferred (ArrayInterface. dense_dims (view (colormat,:,4 ))) === (True (),)
616
+ @test @inferred (ArrayInterface. dense_dims (view (colormat,:,4 : 7 ))) === (True (),True ())
617
+ @test @inferred (ArrayInterface. dense_dims (view (colormat,2 : 3 ,:))) === (True (),False ())
618
+
615
619
Rr = reinterpret (reshape, Int32, R)
616
620
@test @inferred (ArrayInterface. size (Rr)) === (StaticInt (2 ),StaticInt (2 ))
617
621
@test @inferred (ArrayInterface. known_size (Rr)) === (2 , 2 )
618
622
623
+
619
624
Sr = Wrapper (reinterpret (reshape, Complex{Int64}, S))
620
625
@test @inferred (ArrayInterface. size (Sr)) == (static (3 ), static (4 ))
621
626
@test @inferred (ArrayInterface. known_size (Sr)) === (3 , 4 )
622
627
@test @inferred (ArrayInterface. strides (Sr)) === (static (1 ), static (3 ))
628
+ Sr2 = reinterpret (reshape, Complex{Int64}, S);
629
+ @test @inferred (ArrayInterface. dense_dims (Sr2)) === (True (),True ())
630
+ @test @inferred (ArrayInterface. dense_dims (view (Sr2,:,2 ))) === (True (),)
631
+ @test @inferred (ArrayInterface. dense_dims (view (Sr2,:,2 : 3 ))) === (True (),True ())
632
+ @test @inferred (ArrayInterface. dense_dims (view (Sr2,2 : 3 ,:))) === (True (),False ())
623
633
end
624
634
end
625
635
0 commit comments