@@ -468,10 +468,10 @@ end
468468 M = @MArray zeros (2 ,3 ,4 ); Mp = @view (PermutedDimsArray (M,(3 ,1 ,2 ))[:,2 ,:])' ;
469469 Sp2 = @view (PermutedDimsArray (S,(3 ,2 ,1 ))[2 : 3 ,:,:]);
470470 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);
475475
476476 sv5 = @SVector (zeros (5 )); v5 = Vector {Float64} (undef, 5 );
477477 @test @inferred (ArrayInterface. size (sv5)) === (StaticInt (5 ),)
@@ -611,15 +611,25 @@ end
611611
612612 colormat = reinterpret (reshape, Float64, colors)
613613 @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+
615619 Rr = reinterpret (reshape, Int32, R)
616620 @test @inferred (ArrayInterface. size (Rr)) === (StaticInt (2 ),StaticInt (2 ))
617621 @test @inferred (ArrayInterface. known_size (Rr)) === (2 , 2 )
618622
623+
619624 Sr = Wrapper (reinterpret (reshape, Complex{Int64}, S))
620625 @test @inferred (ArrayInterface. size (Sr)) == (static (3 ), static (4 ))
621626 @test @inferred (ArrayInterface. known_size (Sr)) === (3 , 4 )
622627 @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 ())
623633 end
624634end
625635
0 commit comments