@@ -37,6 +37,16 @@ using TestExtras: @constinferred
3737 @test arg1 (similar (typeof (a), (cartesianrange (3 × 2 ), cartesianrange (3 × 2 )))) ≡ Eye (3 )
3838 @test arg1 (similar (a, Float32, (cartesianrange (3 × 2 ), cartesianrange (3 × 2 )))) ≡
3939 Eye {Float32} (3 )
40+ @test arg1 (copy (a)) ≡ Eye (2 )
41+ @test arg2 (copy (a)) == arg2 (a)
42+ b = similar (a)
43+ @test arg1 (copyto! (b, a)) ≡ Eye (2 )
44+ @test arg2 (copyto! (b, a)) == arg2 (a)
45+ @test arg1 (permutedims (a, (2 , 1 ))) ≡ Eye (2 )
46+ @test arg2 (permutedims (a, (2 , 1 ))) == permutedims (arg2 (a), (2 , 1 ))
47+ b = similar (a)
48+ @test arg1 (permutedims! (b, a, (2 , 1 ))) ≡ Eye (2 )
49+ @test arg2 (permutedims! (b, a, (2 , 1 ))) == permutedims (arg2 (a), (2 , 1 ))
4050
4151 a = δ (2 , 2 ) ⊗ randn (3 , 3 )
4252 @test size (a) == (6 , 6 )
@@ -58,6 +68,16 @@ using TestExtras: @constinferred
5868 @test arg1 (similar (typeof (a), (cartesianrange (3 × 2 ), cartesianrange (3 × 2 )))) ≡ δ (3 , 3 )
5969 @test arg1 (similar (a, Float32, (cartesianrange (3 × 2 ), cartesianrange (3 × 2 )))) ≡
6070 δ (Float32, 3 , 3 )
71+ @test arg1 (copy (a)) ≡ δ (2 , 2 )
72+ @test arg2 (copy (a)) == arg2 (a)
73+ b = similar (a)
74+ @test arg1 (copyto! (b, a)) ≡ δ (2 , 2 )
75+ @test arg2 (copyto! (b, a)) == arg2 (a)
76+ @test arg1 (permutedims (a, (2 , 1 ))) ≡ δ (2 , 2 )
77+ @test arg2 (permutedims (a, (2 , 1 ))) == permutedims (arg2 (a), (2 , 1 ))
78+ b = similar (a)
79+ @test arg1 (permutedims! (b, a, (2 , 1 ))) ≡ δ (2 , 2 )
80+ @test arg2 (permutedims! (b, a, (2 , 1 ))) == permutedims (arg2 (a), (2 , 1 ))
6181
6282 # Views
6383 a = @constinferred (Eye (2 ) ⊗ randn (3 , 3 ))
0 commit comments