We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bce3d6 commit 8b5a985Copy full SHA for 8b5a985
test/testsuite/base.jl
@@ -339,11 +339,12 @@ end
339
@test_throws BoundsError view(x, :, :, 1:10)
340
end
341
342
- @test compare(x -> selectdim(x, 3, 1), AT, rand(Float32, 2, 2, 2))
343
- let x = AT(rand(Float32, 5, 4, 3))
344
- @test typeof(view(x, :, :, 1:2)) == typeof(view(x, :, :, Base.Slice(Base.OneTo(2))))
345
- @test typeof(view(x, :, :, 1)) == typeof(view(x, :, Base.Slice(Base.OneTo(4)), 1))
346
- @test typeof(selectdim(x, 3, 1)) == typeof(view(x, :, :, 1))
+ @testset "selectdim" begin
+ @test compare(x -> selectdim(x, 3, 1), AT, rand(Float32, 2, 2, 2))
+ let x = AT(rand(Float32, 5, 4, 3))
+ @test typeof(selectdim(x, 3, 1)) == typeof(view(x, :, :, 1))
+ @test typeof(selectdim(x, 2, 1)) == typeof(view(x, :, 1, :))
347
+ end
348
349
350
# bug in parentindices conversion
0 commit comments